[Issue 5981] New: Can't used post defined constant at compile-time
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed May 11 11:10:32 PDT 2011
http://d.puremagic.com/issues/show_bug.cgi?id=5981
Summary: Can't used post defined constant at compile-time
Product: D
Version: future
Platform: Other
OS/Version: Windows
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: Jesse.K.Phillips+D at gmail.com
CC: Jesse.K.Phillips+D at gmail.com
--- Comment #0 from Jesse Phillips <Jesse.K.Phillips+D at gmail.com> 2011-05-11 11:06:33 PDT ---
The following code compiles for 2.052 but fails in the beta for 2.053. This is
done in DFL.
break.d(3): Error: variable value cannot be read at compile time
class B {
static:
ushort v2 = value;
const ushort value = 342;
}
void main() {
}
You can fix this by moving the declaration up or by defining it as an enum.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list