Thread overview
[Issue 1776] New: template,version,static if
Jan 10, 2008
d-bugmail
Sep 09, 2008
d-bugmail
Sep 11, 2009
Don
January 10, 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@digitalmars.com
        ReportedBy: itouh2@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"


-- 

September 09, 2008
http://d.puremagic.com/issues/show_bug.cgi?id=1776


smjg@iname.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |smjg@iname.com




------- Comment #1 from smjg@iname.com  2008-09-09 16:09 -------
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?


-- 

September 11, 2009
http://d.puremagic.com/issues/show_bug.cgi?id=1776


Don <clugdbug@yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |clugdbug@yahoo.com.au
         Resolution|                            |FIXED


--- Comment #2 from Don <clugdbug@yahoo.com.au> 2009-09-11 05:52:26 PDT ---
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.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------