[Issue 3416] Non-compilable template instantiation in is(typeof()) fails compilation

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Oct 19 05:29:46 PDT 2009


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


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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |clugdbug at yahoo.com.au


--- Comment #5 from Don <clugdbug at yahoo.com.au> 2009-10-19 05:29:45 PDT ---
I don't think this is a bug. You're assuming that is(typeof(X)) is a test for
whether X compiles. But it isn't. is(typeof(X)) only checks if the X has a
semantically valid type. And in this case it does, because it's declared as
void.

There's a larger issue, in that is(typeof(X)) is ugly, and it's very common to
want to see if something compiles. In fact it's arguably the ugliest thing in
the language right now. But it's not a bug.

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


More information about the Digitalmars-d-bugs mailing list