ta0kira / zeolite

Zeolite is a statically-typed, general-purpose programming language.
Apache License 2.0
18 stars 0 forks source link

Explicitly ignoring returns seems to cause function call to be skipped. #185

Closed ta0kira closed 3 years ago

ta0kira commented 3 years ago

For some reason the following skips generating the call to foo:

_ <- foo()

So far I've seen it in unittest, but haven't checked it in normal functions.

ta0kira commented 3 years ago

The issue was that single-return calls used inline assignment of returns, which were "optimized out" when the value is discarded.