www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 11039] New: Undefined instantiation from circular imports

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=11039

           Summary: Undefined instantiation from circular imports
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: bugzilla digitalmars.com


--- Comment #0 from Walter Bright <bugzilla digitalmars.com> 2013-09-14
13:40:06 PDT ---
As reported by Orvid in https://github.com/D-Programming-Language/dmd/pull/2550

------- foo2.d ----------
import b2;

struct SomeStruct(T)
{
    T field;
    T getInnerField()
    {
        return field;
    }
}

static globalField = SomeStruct!string("Hello!");

void main()
{
    globalField.getInnerField();
    anotherGlobalField.getInnerField();
}
------ b2.d --------
import foo2;

static anotherGlobalField = SomeStruct!string("Hello Again!");
--------------------
dmd -c foo2
dmd -c b2
dmd foo2.obj b2.obj

That should produce an undefined reference to
SomeStruct!string.getInnerField().

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Sep 14 2013
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=11039



--- Comment #1 from Walter Bright <bugzilla digitalmars.com> 2013-09-14
13:51:06 PDT ---
https://github.com/D-Programming-Language/dmd/pull/2556

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Sep 14 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=11039



--- Comment #2 from github-bugzilla puremagic.com 2013-09-18 22:00:13 PDT ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/985a413c2702ebeda9352000e73cf3010198f38c
fix Issue 11039 - Undefined instantiation from circular imports

https://github.com/D-Programming-Language/dmd/commit/9ff2c36ab25a7f09c2b374c0e91baf97a453b405
Merge pull request #2556 from WalterBright/fix11039

fix Issue 11039 - Undefined instantiation from circular imports

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Sep 18 2013
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=11039


Kenji Hara <k.hara.pg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |link-failure, pull
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Sep 18 2013