[Issue 2869] alias type not equal to origin type when typeof called on it
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Apr 27 01:59:29 PDT 2009
http://d.puremagic.com/issues/show_bug.cgi?id=2869
smjg at iname.com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |smjg at iname.com
Status|NEW |RESOLVED
Resolution| |INVALID
Summary|alias type not equel to |alias type not equal to
|origin type when typeof call|origin type when typeof
|on it |called on it
------- Comment #1 from smjg at iname.com 2009-04-27 03:59 -------
The compiler is behaving correctly.
http://www.digitalmars.com/d/2.0/declaration.html#Typeof
Typeof:
typeof ( Expression )
typeof ( return )
"int" is not parseable as an expression, therefore "typeof(int)" correctly
fails to compile.
"inttype" is, OTOH, parseable as an expression, just not semantically valid as
one. Therefore the IsExpression correctly evaluates to false.
--
More information about the Digitalmars-d-bugs
mailing list