Some methods and properties are typed as never with LuaU Type Solver

I’m not sure if this is 100% from the new luau type solver but every single method that i used on workspace was given with never as a returned type, it also doesn’t seem to show the required arg tab where it shows what arg you’re typing, some people have said their type functions are also considered never

EDIT ^ it’s confirmed to be a LuaU Type Solver bug



image

right now i currently have a new Luau Type Solver on cuz my project relies on a new typing


Expected behavior

usually the methods would return as their own thing e.g :Clone() would return as self based on what you’re cloning or :Raycast() should just give you the RaycastResult as normal, if you want to actually see it return specific things, you’d type it as anything that method return

Reproduction step

  • Enable the new type solver in the beta features
  • After enabled, create any script either the server side, LocalScript or ModuleScript
  • Go ahead, type the first variable that assigns to a method or properties
  • Hover your cursor to that method or properties and it should give us never
3 Likes

update: typing doesn’t work on “value” in a loop, it’s also on properties

Hi there, this does indeed look like a bug either in Luau’s New Type Solver or in the data model awareness code that is enabled along side the New Type Solver. Unfortunately, you’ve not given us enough information to be able to reproduce it however. We’ll try to investigate ourselves, but if you’d like us to be able to make good progress on this, submitting a reproduction, rather than partial screenshots of code, is necessary for us to be able to investigate more deeply. If you have an orange line on the first line of the script, that is especially telling since it indicates that the type inference system’s constraint solving stage did not complete properly.

P.S. the language is named Luau, it’s a Hawaiian word pronounced like loo-ow, not the Portuguese word Lua with a capital U tacked on.

hihi, I’ve updated the post with reproduction steps

unfortunately even if there wasn’t any orange line, it still occurs but if i put a type on it when it’s still a variable, it’d return exactly as what i wanted