You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
defmy_mux(x, y, s):
withm.when(~s):
returnxwithm.otherwise():
returny
produces counter-intuitive results.
We know per the spec that this is acts as expected, but it might be un-expected for the designer. Ideally, we would like to detect such code (and perhaps other similar cases) and raise a warning or error.
The text was updated successfully, but these errors were encountered:
The problem here is that the return control flow exits the code "prematurely" (w.r.t. the designer's desire). I'm not sure we can use the context manager cleanup pattern here to detect this undesired behavior, so I think the only mechanism here would be a linter.
Code like
produces counter-intuitive results.
We know per the spec that this is acts as expected, but it might be un-expected for the designer. Ideally, we would like to detect such code (and perhaps other similar cases) and raise a warning or error.
The text was updated successfully, but these errors were encountered: