We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Simple case:
declare class Vector3 end declare class CFrame function __mul(self, other: CFrame): CFrame function __mul(self, other: Vector3): Vector3 end
Instead of creating an intersection type var of overloads for __mul, it just uses the last defined function.
__mul
Looks like the root cause is at https://github.com/Roblox/luau/blob/f2b334a4bb26c0ac3aedd4db5d828f2d6b5f7de0/Analysis/src/TypeInfer.cpp#L1677-L1683
where it only checks ctv->props.count(), but since it is a metamethod it should be looking at metatable->props
ctv->props.count()
metatable->props
The text was updated successfully, but these errors were encountered:
Fix overloaded metamethod in class definitions (#653)
e9e2cba
Fixes #652
Successfully merging a pull request may close this issue.
Simple case:
Instead of creating an intersection type var of overloads for
__mul
, it just uses the last defined function.Looks like the root cause is at https://github.com/Roblox/luau/blob/f2b334a4bb26c0ac3aedd4db5d828f2d6b5f7de0/Analysis/src/TypeInfer.cpp#L1677-L1683
where it only checks
ctv->props.count()
, but since it is a metamethod it should be looking atmetatable->props
The text was updated successfully, but these errors were encountered: