Bug 1776 – template,version,static if

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2008-01-10T03:24:00Z
Last change time
2015-06-09T01:14:26Z
Assigned to
nobody
Creator
itouh2

Comments

Comment #0 by itouh2 — 2008-01-10T03:24:19Z
----- test.d ----- class C { version( VER_A ) { void foo(T)( T[] data) { static if( is( T == ushort) || is( T == uint) ) { } else { static assert( false ); } } } } ----- compile with -c option ----- test.di ----- template init(T) { void foo( T[] data) { static if(is(T == ushort) || is(T == uint)) else static assert(false); } } ---- error "found 'else' instead of statement"
Comment #1 by smjg — 2008-09-09T16:09:29Z
What exactly is the bug you're reporting? (a) that some unspecified process is generating this syntactically incorrect .di file? IWC please give the full command line, and double-check that the .d file you posted really is exactly the one you used. (b) that the error message is missing its filename/line number? (c) something else entirely?
Comment #2 by clugdbug — 2009-09-11T05:52:26Z
The original bug was that dmd -H test.d produced the defective test.di file. This was fixed in dmd1.039 or 1.041. Fixed in D2 at the same time.