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

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
}