[Issue 6784] New: Compile-time constant assigned with a runtime value
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Oct 7 15:38:19 PDT 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6784
Summary: Compile-time constant assigned with a runtime value
Product: D
Version: D2
Platform: x86
OS/Version: Windows
Status: NEW
Keywords: accepts-invalid
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: bearophile_hugs at eml.cc
--- Comment #0 from bearophile_hugs at eml.cc 2011-10-07 15:37:34 PDT ---
This program compiles with no errors (DMD 2.056head), but I think it's wrong
because the compile-time constant y gets assigned with a runtime value:
struct Foo {
immutable uint x;
void foo() {
enum uint y = x;
}
}
void main(string[] args) {
auto f = Foo(args.length);
}
--
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