Bug 7218 – Nested function with contract is rejected

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-01-04T08:26:00Z
Last change time
2012-01-05T00:51:29Z
Keywords
patch, rejects-valid
Assigned to
nobody
Creator
k.hara.pg

Comments

Comment #0 by k.hara.pg — 2012-01-04T08:26:00Z
This code can't compile. void main() { size_t foo() in{} out{} body{ return 0; } // OK size_t bar() in{} /*out{}*/ body{ return 0; } // OK size_t hoo() /*in{}*/ out{} body{ return 0; } // NG1 size_t baz() /*in{} out{}*/ body{ return 0; } // NG2 }
Comment #1 by k.hara.pg — 2012-01-04T08:31:25Z
Comment #2 by bugzilla — 2012-01-05T00:51:29Z