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
function rand_or_nothing()
if (foo = rand()) < .5
return foo
end
return foo + 1
end
while (bar = rand_or_nothing()) < .7
display(bar)
end
display(bar)
While foo is correctly detected by the linter as being well-defined in both of its occurences, bar is reported as a "missing reference" in the second call to display (but not in the first call inside the while loop).
The code runs fine (without warning) when interpreted by Julia.
The text was updated successfully, but these errors were encountered:
Consider the following MRE:
While
foo
is correctly detected by the linter as being well-defined in both of its occurences,bar
is reported as a "missing reference" in the second call todisplay
(but not in the first call inside thewhile
loop).The code runs fine (without warning) when interpreted by Julia.
The text was updated successfully, but these errors were encountered: