mojo
mojo copied to clipboard
[BUG] Adding "nodebug" change runtime behaviour
Bug description
As title. If I understand correctly, the following should be equivalent:
# two-branches
@parameter
if cond:
return body_true()
else:
body_false()
# guard
@parameter
if cond:
return body_true()
body_false()
However, it appears to not be the case, as can be seen in #2220. Content of the consecutive commits in #2220:
-
b45ed87 (
two-branches
) has a function with a@parameter if
with two branches. CI passes. -
d8df28d (
guard
) made the above mentioned mechanical change, and CI check fails. -
cb040c4a (
nonodebug
) removes"nodebug"
from the offending function found inguard
, and CI passes again.
Steps to reproduce
I can't manage to reduce the repro further, so I created #2220 and #2222 to use CI to show the problem.
System information
Mojo nightly