7218 – Nested function with contract is rejected

D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 7218 - Nested function with contract is rejected
Summary: Nested function with contract is rejected
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P2 normal
Assignee: No Owner
URL:
Keywords: patch, rejects-valid
Depends on:
Blocks:
Reported: 2012年01月04日 08:26 UTC by Kenji Hara
Modified: 2012年01月05日 00:51 UTC (History)
1 user (show)

See Also:


Attachments
Add an attachment (proposed patch, testcase, etc.)

Note You need to log in before you can comment on or make changes to this issue.
Description Kenji Hara 2012年01月04日 08:26:00 UTC
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 Kenji Hara 2012年01月04日 08:31:25 UTC
https://github.com/D-Programming-Language/dmd/pull/608 


AltStyle によって変換されたページ (->オリジナル) /