Closed JSAbrahams closed 1 year ago
Catagorized this as bug since a few tests already assume this behaviour partially (in the type checker).
The generate code stage however does not yet deal with this, so the reference (*_check.py
) files always assume no return if not explicit in Mamba.
Forgot about match arms
Hm, and ternary expressions?
Well, it is actually not used in the generate stage anymore. Might be useful though if we want to use an if as an expression in other places (not perse in a function). I'll leave this issue open so I don't forget to make a separate issue for the above.
Current Issue
Unless we explicitly end a function with
return
, it does not return anything.High-level description of the feature
In Mamba, a function that ends with an expression returns that type as long if the signature states as such.
Description of potential implementation
See #165