[Issue 217] typeof not working properly in internal/object.d
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Oct 20 01:24:03 PDT 2007
http://d.puremagic.com/issues/show_bug.cgi?id=217
------- Comment #3 from braddr at puremagic.com 2007-10-20 03:24 -------
The attachment was applied in 1.022/2.006, but the underlying but wasn't fixed.
Here's a reduced test case for it:
---------
extern(C) void bar(foo b);
alias typeof(int.sizeof) foo;
void main() { bar(1); }
---------
results in:
bug217.d(3): function bug217.bar (typeof(4u)) does not match parameter types
(int)
bug217.d(3): Error: cannot implicitly convert expression (1) of type int to
typeof(4u)
bug217.d(3): Error: cannot cast int to typeof(4u)
bug217.d(3): Error: integral constant must be scalar type, not typeof(4u)
If the first two lines are reversed, it builds fine.
--
More information about the Digitalmars-d-bugs
mailing list