Bug 5186 – typeof({return 0;}()) works in alias declaration, not as variable type

Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2010-11-07T17:18:00Z
Last change time
2011-06-15T11:48:32Z
Keywords
rejects-valid
Assigned to
nobody
Creator
simen.kjaras

Comments

Comment #0 by simen.kjaras — 2010-11-07T17:18:42Z
This works: alias typeof( { return 0; }() ) T; T foo; This doesnt (found 'foo' when expecting ';' following statement): typeof( { return 0; }() ) foo;
Comment #1 by yebblies — 2011-06-15T11:48:32Z
*** This issue has been marked as a duplicate of issue 4633 ***