Lesma
Lesma copied to clipboard
Function definitions don't recognize that if all conditionals have a return, it will always return
Function definitions don't recognize that if all conditionals have a return, it will always return. Instead they complain that there's no return in the main block of the function. Take this example:
def test(x: int) -> int
if x > 5
return 5
else
return 7
Currently Lesma can't compile that. We might be able to get away by just modifying the code generator, not including any analysis steps of sorts.