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
I expect GetValidRandomNumber to return number because the while loop will never exit unless the number is returned, but the solver infers that it returns number?.
I don't think this is a bug... It's theoretically possible that the while true loop would run indefinitely and not return anything, but the probability of that happening is equivalent to the probability of the IsValid function always returning false for an infinite sequence of independent random numbers (which is lim (n → ∞) (1/2)n = 0, or speaking words, the probability of this event occurring is infinitesimally small). So the solver's infer is right?
(or it's just Luau being Luau I don't know ¯\_(ツ)_/¯)
I expect
GetValidRandomNumber
to returnnumber
because the while loop will never exit unless the number is returned, but the solver infers that it returnsnumber?
.The text was updated successfully, but these errors were encountered: