[Issue 12906] New: [CTFE] Static array of structs causes postblit call

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Fri Jun 13 00:57:51 PDT 2014


https://issues.dlang.org/show_bug.cgi?id=12906

          Issue ID: 12906
           Summary: [CTFE] Static array of structs causes postblit call
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Keywords: CTFE, wrong-code
          Severity: regression
          Priority: P1
         Component: DMD
          Assignee: nobody at puremagic.com
          Reporter: verylonglogin.reg at gmail.com

This code should compile:
---
struct S
{ this(this) { assert(0); } } // line 2

static assert({ // line 4
    S[1] sarr;
    return true;
}()); // line 7
---
main.d(2): Error: assert(0) failed
main.d(7):        called from here: (*() => true)()
main.d(4):        while evaluating: static assert((*() => true)())
---

--


More information about the Digitalmars-d-bugs mailing list