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

           Summary: ICE: expression.c:8186: virtual Expression*
                    CallExp::semantic(Scope*): Assertion `td' failed
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: [email protected]
        ReportedBy: [email protected]


--- Comment #0 from [email protected] 2013-06-02 10:59:21 PDT ---
Test case shouldn't compile however the compiler errors. Minimized using
dustmite:

struct Foo {
  string _str;
  long _integer;

  template DeclareConstructor(string propertyName) {
    enum code = `this(typeof(_` ~ propertyName ~ `) value) {
      ` ~ propertyName ~ ` = value;
      }`;
    mixin(code);
  }

  mixin DeclareConstructor!"str";
  mixin DeclareConstructor!"integer";
}

void main() {
  auto value = Foo;
  value.object = Foo("D");
}


Replacing enum from code variable with auto stops the ICE.

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

Reply via email to