Bug 1388 – multiple static constructors allowed in module
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
Linux
Creation time
2007-07-31T00:51:00Z
Last change time
2014-02-16T15:26:23Z
Keywords
accepts-invalid, spec
Assigned to
bugzilla
Creator
tomas
Comments
Comment #0 by tomas — 2007-07-31T00:51:33Z
module bad;
static this() {}
static this() {}
^^
The dmd frontend accepts this but generates two function declarations with the same mangled name. Causes code generation error in gdc 0.23.
I could not find anywhere in the spec where it's specified whether multiple module constructors are allowed, so I have marked this bug 'spec' as well.