Open Daw588 opened 1 month ago
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?
.