http://d.puremagic.com/issues/show_bug.cgi?id=965
Denis <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] Platform|x86 |All Version|1.005 |D1 & D2 Summary|incorrect result for |`is(<uncompilable |"is(BadTemplate!())" |template>)` is true and | |doesn't gap errors if not | |in a function OS/Version|Linux |All --- Comment #3 from Denis <[email protected]> 2012-01-01 13:59:08 MSK --- This code compiles: --- struct S() { void f() { error; } } void f() { static assert(!is(S!())); // passes static if(is(S!())) { } // no errors } --- This bug is only for `is()` not in a function: --- struct S() { void f() { error; } } static assert(!is(S!())); // assertion fails static if(is(S!())) { } // Error: undefined identifier --- (In reply to comment #1) > This is happening because compiling this()'s body is not necessary to > determine > the type. Not sure if this is a bug or not. This is a bug because an assertion passes in a function and because of "undefined identifier" error with `static if`. Someone familiar with dmd internals, mark bug 3448 as a duplicate or show the difference between `is(...)` and `__traits(compiles, ...)` in context of this issue. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
