Bug 5213 – const/immutable inner structs don't work

Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2010-11-13T14:40:00Z
Last change time
2011-12-27T06:26:39Z
Keywords
rejects-valid
Assigned to
nobody
Creator
bearophile_hugs

Comments

Comment #0 by bearophile_hugs — 2010-11-13T14:40:22Z
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'
Comment #1 by k.hara.pg — 2011-12-27T06:26:39Z
*** This issue has been marked as a duplicate of issue 6534 ***