Wiki

Changeset 2300

Show
Ignore:
Timestamp:
03/05/10 05:30:16 (2 years ago)
Author:
Chuck.Esterbrook
Message:

Fixed: False compilation error in anonymous method with no return type and a simple return statement.
ticket:197
credit:hopscc

Location:
cobra/trunk
Files:
1 added
2 modified

Legend:

Unmodified
Added
Removed
  • cobra/trunk/Developer/IntermediateReleaseNotes.text

    r2299 r2300  
    438438 
    439439* Fixed: Cobra compile failure on delegates calling .(begin|end)Invoke. ticket:196 
     440 
     441* Fixed: False compilation error in anonymous method with no return type and a simple `return` statement. ticket:197 
  • cobra/trunk/Source/Statements.cobra

    r2274 r2300  
    10841084            expr.contextType = curCodeMember.resultType 
    10851085        else 
    1086             if curCodeMember.resultType is not .compiler.voidType 
     1086            # TODO: the check for .passThroughType below is required only because lambdas are using it for their return value instead of setting it to the correct type. so improving lambdas (AnonExpr) will allow the removal of that check 
     1087            if curCodeMember.resultType is not .compiler.voidType and curCodeMember.resultType is not .compiler.passThroughType 
    10871088                .throwError('Return statement must return a [curCodeMember.resultType.name], or [curCodeMember.name] must have its return type removed.') 
    10881089        curCodeMember.hasReturnStmt = true