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
Instance.new("Model") :: (Model & {kid: BasePart})
--!strict local a = Instance.new("Model") :: (Model & {kid: BasePart}) --Type Error: (68,11) Cannot cast 'Model' into 'Model & { kid: BasePart }' --because the types are unrelated
It would be sensible to allow such casts. they are allowed in the old solver but not in the new one
The text was updated successfully, but these errors were encountered:
From the looks of it, instances are not considered tables... here is a very similar warning:
type Widget = ButtonWidget | InputWidget type ButtonWidget = { type: { Value: "Button", }, } type InputWidget = { type: { Value: "Input", } } -- "Button" | "Input" type WidgetClass = index<index<Widget, "type">, "Value">
A warning appears when i add roblox types:
type Widget = ButtonWidget | InputWidget type ButtonWidget = { type: StringValue & { Value: "Button", }, } type InputWidget = { type: StringValue & { Value: "Input", } } --Type Error: (57,20) Property '"Value"' does not exist on type --'(StringValue & { Value: "Button" }) | (StringValue & { Value: "Input" })' type WidgetClass = index<index<Widget, "type">, "Value">
AND it does not appear if:
type ButtonWidget = { type: StringValue & { Value: "Button", }, } type InputWidget = { -- 'StringValue &' is missing type: { Value: "Input", } }
Sorry, something went wrong.
No branches or pull requests
It would be sensible to allow such casts. they are allowed in the old solver but not in the new one
The text was updated successfully, but these errors were encountered: