Thread overview
[Issue 4048] New: [CTFE] struct initializer
Apr 12, 2011
Don
[Issue 4048] [CTFE] struct initializer: missing line number in error message
Apr 28, 2011
Walter Bright
April 02, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4048

           Summary: [CTFE] struct initializer
           Product: D
           Version: future
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody@puremagic.com
        ReportedBy: bearophile_hugs@eml.cc


--- Comment #0 from bearophile_hugs@eml.cc 2010-04-02 14:34:02 PDT ---
(Not tested with the latest bug fixes)


struct Foo {
    /*static*/ struct Bar { int x; }
    Bar b = { x: 1 };
}
int spam() {
    Foo f;
    return 0;
}
void main() {
    enum int _ = spam();
}


dmd 2.042 gives (with no line of error):

Error: cannot make expression out of initializer for b

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
April 12, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=4048


Don <clugdbug@yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|rejects-valid               |diagnostic


--- Comment #1 from Don <clugdbug@yahoo.com.au> 2011-04-12 00:18:00 PDT ---
The rejects-valid aspect of this bug is a duplicate of bug 3792.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
April 28, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=4048


Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bugzilla@digitalmars.com
         Resolution|                            |FIXED


--- Comment #2 from Walter Bright <bugzilla@digitalmars.com> 2011-04-27 20:07:42 PDT ---
https://github.com/D-Programming-Language/dmd/commit/97c73b140f1cde5d0b713eb72fd1e82084a6ac11

https://github.com/D-Programming-Language/dmd/commit/13dcf90d934325b4f37c50679e07978a821c4249

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