|
@@ -255,6 +255,7 @@ Type TReturnStmt Extends TStmt
|
|
Err errorText
|
|
Err errorText
|
|
End If
|
|
End If
|
|
expr=expr.SemantAndCast( fdecl.retType )
|
|
expr=expr.SemantAndCast( fdecl.retType )
|
|
|
|
+ If TIdentTypeExpr(expr) Err "Function must return a value."
|
|
Else If fdecl.IsCtor()
|
|
Else If fdecl.IsCtor()
|
|
expr=New TSelfExpr.Semant()
|
|
expr=New TSelfExpr.Semant()
|
|
Else If Not TVoidType( fdecl.retType )
|
|
Else If Not TVoidType( fdecl.retType )
|