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

RFC: Type states. #478

Closed
wants to merge 3 commits into from
Closed

RFC: Type states. #478

wants to merge 3 commits into from

Conversation

alexmccord
Copy link
Contributor

No description provided.

@alexmccord alexmccord added the rfc Language change proposal label May 10, 2022
@Dionysusnu
Copy link

Here's a rendered link.

What will this change mean for the following code?

local x: number? = 1
function revertX()
    x = nil
end
revertX()
local y: number = x

This is currently sound (TypeError on y assignment). With this RFC, is it tracked that x could revert to a different value in a callback? The RFC covers some introduced unsoundness with table references modified elsewhere, but that's minor. The case above appears more frequently, especially if x is modified in an event handler (RBXScriptConnection) or there is some yielding call in between.

@zeux
Copy link
Collaborator

zeux commented Oct 30, 2023

This PR is closed as part of RFC migration; please see #1074 (comment) for context.

@zeux zeux closed this Oct 30, 2023
@zeux zeux deleted the alexmccord-patch-1 branch October 30, 2023 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rfc Language change proposal
Development

Successfully merging this pull request may close these issues.

3 participants