Bug 4633 – typeof({return 1;}()) declaration fails if inside main

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
Other
OS
All
Creation time
2010-08-12T07:43:00Z
Last change time
2011-06-20T14:06:23Z
Keywords
rejects-valid
Assigned to
nobody
Creator
simendsjo

Comments

Comment #0 by simendsjo — 2010-08-12T07:43:37Z
typeof({return 1;}()) a; // ok void main() { typeof({return 1;}()) b; // found 'b' when expecting ';' following statement }
Comment #1 by yebblies — 2011-06-15T11:48:33Z
*** Issue 5186 has been marked as a duplicate of this issue. ***
Comment #2 by bugzilla — 2011-06-20T14:06:23Z