Open Mte90 opened 1 month ago
The code involved is https://github.com/amber-lang/amber/blob/435d91c4aabce2bd016db77313b221eec38a6a65/src/modules/function/invocation.rs#L158
Basically print that also if the function doesn't have any return.
i dont know if we can do this without breaking apart the whole compiler. its kind of like google translate, really
Yeah this is something for @Ph0enixKM that knows how works.
I think that this is the moment when we should add that optimization I explained before:
https://www.youtube.com/watch?v=_caXIMxrYj8&feature=youtu.be
This would solve this issue too.
Take this code:
It will generated:
As we can see the function doesn't have any return so the last 2 lines are not needed.