[Issue 3325] ICE(func.c) function literal with post-contract

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Sep 29 23:52:51 PDT 2009


http://d.puremagic.com/issues/show_bug.cgi?id=3325


Don <clugdbug at yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch


--- Comment #7 from Don <clugdbug at yahoo.com.au> 2009-09-29 23:52:50 PDT ---
(In reply to comment #1)
> This ICE is because it needs to know the return type, before it can create 
the result variable for the post-condition. Creation of the result variable 
should probably happen in ReturnStatement::semantic, and the semantic for the
> post-condition run _after_ the function semantic, instead of before.

That wouldn't actually work, because there may be more than one return 
statement -- the result variable needs to be added at the start of the 
function. Maybe it's better for now to simply disallow postconditions on 
functions with type inference return statements, turning it from an ICE into an 
obscure rejects-valid.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list