Open cqcallaw opened 8 years ago
Idea: permit the return type to be inferred if the function "body" is an expression instead of a statement block. That is, (a:int, b:int) -> a * b
would be valid, but (a:int, b:int) -> { return a * b }
would be invalid.
For one-liner anonymous functions, inferring the return type is handy.
Care should be taken to engineer this so it's not encouraged for larger functions where the return type is important for verifying the semantic correctness of the function.