www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 5213] New: const/immutable inner structs don't work

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=5213

           Summary: const/immutable inner structs don't work
           Product: D
           Version: D2
          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-11-13 14:40:22 PST ---
This D2 code looks correct:


void main() {
    const struct S1 {}
    immutable struct S2 {}
    static const struct S3 {}
    static immutable struct S4 {}
}


But DMD 2.050 shows the compilation errors:

test.d(2): basic type expected, not struct
test.d(2): no identifier for declarator int
test.d(2): semicolon expected, not 'struct'
test.d(3): basic type expected, not struct
test.d(3): no identifier for declarator int
test.d(3): semicolon expected, not 'struct'
test.d(4): basic type expected, not struct
test.d(4): no identifier for declarator int
test.d(4): semicolon expected, not 'struct'
test.d(5): basic type expected, not struct
test.d(5): no identifier for declarator int
test.d(5): semicolon expected, not 'struct'

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Nov 13 2010
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=5213


Kenji Hara <k.hara.pg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |DUPLICATE


--- Comment #1 from Kenji Hara <k.hara.pg gmail.com> 2011-12-27 06:26:39 PST ---
*** This issue has been marked as a duplicate of issue 6534 ***

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