Bug 3071 – nested func declaration parse problem

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2009-06-16T20:06:00Z
Last change time
2015-06-09T01:27:45Z
Keywords
rejects-valid
Assigned to
nobody
Creator
davidl

Comments

Comment #0 by davidl — 2009-06-16T20:06:33Z
void func1(invariant(void)[] t) { size_t func2(invariant(void)[] t) { return 0; } }
Comment #1 by gide — 2009-06-17T04:43:04Z
Does not compile with DMD v2.030. Changing size_t to int and/or replacing invariant(int)[] with int[] makes the code compile. test.d ------ void func1() { size_t func2(invariant(void)[] t) { return 0; } } C:\>dmd test.d test.d(5): found 'func2' when expecting ';' following 'statement' test.d(10): found '}' when expecting ';' following 'statement' test.d(12): found 'EOF' instead of statement test.d(12): found 'EOF' instead of statement test.d(12): found 'EOF' instead of statement test.d(12): found 'EOF' instead of statement test.d(12): found 'EOF' instead of statement test.d(12): found 'EOF' instead of statement test.d(12): found 'EOF' instead of statement test.d(12): found 'EOF' instead of statement test.d(12): found 'EOF' instead of statement test.d(12): found 'EOF' instead of statement test.d(12): found 'EOF' instead of statement test.d(12): found 'EOF' instead of statement test.d(12): found 'EOF' instead of statement test.d(12): found 'EOF' instead of statement test.d(12): found 'EOF' instead of statement test.d(12): found 'EOF' instead of statement test.d(12): found 'EOF' instead of statement test.d(12): found 'EOF' instead of statement test.d(12): found 'EOF' instead of statement
Comment #2 by bugzilla — 2009-07-09T02:56:56Z
Fixed dmd 2.031