[Issue 3261] New: compiler crash with mixin and forward reference (Issue 402 and 784)

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Aug 19 19:09:53 PDT 2009


http://d.puremagic.com/issues/show_bug.cgi?id=3261

           Summary: compiler crash with mixin and forward reference (Issue
                    402 and 784)
           Product: D
           Version: 2.032
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: ktswital at gmail.com


this is slightly different code from Issue 402 and Issue 784, but it causes the
compiler to freeze in DMD 1.046 and 2.032:

> dmd -c Conflicts.d
Conflicts.d(12): Error: mixin Conflicts.foo.BadImpl!(uint,Mix1) cannot resolve
forward reference
Conflicts.d(12): Error: mixin Conflicts.foo.BadImpl!(uint,Mix1) cannot resolve
forward reference

--- Conflicts.d ----

template BadImpl(T, alias thename)
{
  void a_bad_idea(T t)
  {
    thename.a_bad_idea(t);
  }
}

class foo
{
  mixin BadImpl!(uint,Mix1) Mix1;
}

int main()
{
  return 0;
}

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


More information about the Digitalmars-d-bugs mailing list