luau
luau copied to clipboard
[new solver] functions returning `never` aren't treated the same as `error` in codepath analysis
In my runtime, I have a function process.exit that immediately exits the current process and therefore should return never.
I find that error seems to be special cased or something, because my process.exit unfortunately doesn't have the same behavior in codepath analysis that error does (in fixing "not all codepaths in this function return..." TypeErrors)
Minimal-ish repro with some examples of what works and what doesn't:
https://github.com/deviaze/solverbugs/blob/main/src/never_says_never.luau