Bug 7226 – Refused pure nothrow ctor syntax

Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2012-01-04T14:16:00Z
Last change time
2013-01-16T07:37:10Z
Keywords
rejects-valid
Assigned to
nobody
Creator
bearophile_hugs

Comments

Comment #0 by bearophile_hugs — 2012-01-04T14:16:06Z
I think this is a parser issue: struct Foo { static this() pure nothrow {} } void main() {} DMD 2.058head gives: test.d(2): semicolon expected following function declaration - - - - - - - - - - - - - - A different case: struct Foo { static pure this() {} } void main() {} DMD 2.058head gives: test.d(2): Error: constructor test.Foo.this default constructor for structs only allowed with @disable and no body
Comment #1 by yebblies — 2013-01-16T07:08:02Z
Basically the same thing as issue 6415, also applies to unittests
Comment #2 by yebblies — 2013-01-16T07:37:10Z
*** This issue has been marked as a duplicate of issue 6677 ***