Wiki
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

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • 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