[Issue 4283] New: static if with dangling else clause
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Jun 6 06:34:41 PDT 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4283
Summary: static if with dangling else clause
Product: D
Version: future
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 2010-06-06 06:34:41 PDT ---
This D2 program compiles and runs with v2.046, but the syntax is wrong:
template Foo(bool b) {
static if (b)
enum bool Foo = 1;
else
}
static assert(Foo!(true) == 1);
void main() {}
--
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