[Issue 1776] New: template,version,static if

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Jan 10 01:24:21 PST 2008


http://d.puremagic.com/issues/show_bug.cgi?id=1776

           Summary: template,version,static if
           Product: D
           Version: 2.009
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: itouh2 at hotmail.com


----- 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"


-- 



More information about the Digitalmars-d-bugs mailing list