Skip to content
New issue

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

New solver: Type state doesn't let member types be widened #1486

Open
ffrostfall opened this issue Oct 25, 2024 · 1 comment
Open

New solver: Type state doesn't let member types be widened #1486

ffrostfall opened this issue Oct 25, 2024 · 1 comment
Assignees
Labels
bug Something isn't working new solver This issue is specific to the new solver.

Comments

@ffrostfall
Copy link

image

Minimum repro:

local value: {
	thing: {}?
} = {}

if not value.thing then
	value.thing = {}
end
@ffrostfall ffrostfall added the bug Something isn't working label Oct 25, 2024
@aatxe aatxe added the new solver This issue is specific to the new solver. label Oct 25, 2024
@aatxe
Copy link
Collaborator

aatxe commented Oct 25, 2024

Looks more like the issue is that it's using the refined type of the property in the lvalue position here, and not about widening since your original annotated type for value should permit {} as-is.

@aatxe aatxe self-assigned this Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working new solver This issue is specific to the new solver.
Development

No branches or pull requests

2 participants