[Issue 6078] New: CTFE: ICE on foreach over array struct member which is null

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun May 29 11:36:02 PDT 2011


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

           Summary: CTFE: ICE on foreach over array struct member which is
                    null
           Product: D
           Version: D2
          Platform: x86
        OS/Version: All
            Status: NEW
          Severity: major
          Priority: P2
         Component: coffimplib
        AssignedTo: nobody at puremagic.com
        ReportedBy: code at klickverbot.at


--- Comment #0 from klickverbot <code at klickverbot.at> 2011-05-29 11:31:41 PDT ---
struct Foo {
  int[] bar;
}

enum baz = {
  Foo f;
  int i;
  foreach (e; f.bar) {
    i += e;
  }
  return i;
}();
---

With latest DMD from Git master (c1b7e0a): Assertion failed: ((newval->op ==
TOKarrayliteral || newval->op == TOKassocarrayliteral || newval->op ==
TOKstring || newval->op == TOKslice || newval->op == TOKnull)), function
interpretAssignCommon, file interpret.c, line 2563.

-- 
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