Unresolvable comparisons in type functions break the type solver for all place files

Take this simple childrenof type function for example, which should be a near-equivalent to the keyof function, expect it creates an union of the instance’s children names.

If you were to put a contradicting comparison, say that if type was a singleton even if it was a class type and return an arbitrary type, it would break the type solver across all place files shown by that orange bar when used. This renders autocomplete and typechecking completely useless.


This bug can be fixed by deactivating and then re-enrolling back to the Luau type solver beta, but the behavior makes no room for mistakes and that you’ll have to be extra careful when dealing with type logic regardless if this is intentional or not.

Expected behavior

I expect the type function to simply error when that is already the case in runtime code, when the linter would claim that this is impossible to do.

1 Like

Hello there, and thank you for the report! I believe that this issue should be fixed today in the New Type Solver, but I can’t reproduce since you did not provide the script text or the necessary data model structure to reproduce. I’m going to close it out for now since this class of issues should have been fixed, but if you’re still reproducing it, feel free to open a new issue and provide the place file or full context necessary to reproduce the issue.