[Issue 965] `is()` is true and doesn't gap errors if not in a function
https://issues.dlang.org/show_bug.cgi?id=965 Simen Kjaeraas changed: What|Removed |Added Status|NEW |RESOLVED CC||simen.kja...@gmail.com Resolution|--- |FIXED --- Comment #6 from Simen Kjaeraas --- All asserts in this issue pass under 2.075.1. Closing. --
[Issue 965] `is()` is true and doesn't gap errors if not in a function
https://issues.dlang.org/show_bug.cgi?id=965 Andrei Alexandrescu changed: What|Removed |Added Version|D1 & D2 |D2 --
[Issue 965] `is()` is true and doesn't gap errors if not in a function
http://d.puremagic.com/issues/show_bug.cgi?id=965 Don changed: What|Removed |Added CC||dav...@126.com --- Comment #5 from Don 2012-11-21 00:47:55 PST --- *** Issue 2167 has been marked as a duplicate of this issue. *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 965] `is()` is true and doesn't gap errors if not in a function
http://d.puremagic.com/issues/show_bug.cgi?id=965 Don changed: What|Removed |Added CC||ibuc...@ubuntu.com --- Comment #4 from Don 2012-02-24 00:38:36 PST --- *** Issue 5352 has been marked as a duplicate of this issue. *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 965] `is()` is true and doesn't gap errors if not in a function
http://d.puremagic.com/issues/show_bug.cgi?id=965 Denis changed: What|Removed |Added CC||verylonglogin@gmail.com Platform|x86 |All Version|1.005 |D1 & D2 Summary|incorrect result for|`is()` is true and ||doesn't gap errors if not ||in a function OS/Version|Linux |All --- Comment #3 from Denis 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: ---