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

fix: type narrowing bugs with literal fields #3098

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lewis6991
Copy link
Contributor

@lewis6991 lewis6991 commented Feb 27, 2025

Fixes #3089
Fixes #2952
Fixes #3056

@tomlau10
Copy link
Contributor

In order to properly link multiple issues, I believe the PR description needs to be:

Fixes #3089, Fixes #2952, Fixes #3056

i.e. each issue needs to be prefixed with Fixes 👀

Currently only #3089 is linked:
image

@@ -268,6 +268,11 @@ local function getNodeTypesWithLiteralField(uri, source, fieldName, literal)
return
end

-- Literal must has a value
if literal[1] == nil then
return
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is only reachable when literal.type = 'nil'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants