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 jumping to definition on nullable parameters #3804

Merged
merged 1 commit into from Jul 11, 2020

Conversation

joehoyle
Copy link
Contributor

@joehoyle joehoyle commented Jul 11, 2020

Currently it's not possible to "Go to definition" (LSP) on nullable args like function( ?MyClass $class ) as the reference is stored as MyClass|null in the reference map, which will now resolve to a class name.

This PR removed any nullable type from the union before adding it to the reference map (as the reference map is only use to indicate a symbol was used in a given location, I think this makes sense).

Currently it's not possible to "Go to definition" (LSP) on nullable args like `function( ?MyClass )` as the reference is stored a `MyClass|null` in the reference map, which will now resolve to a class name.

This PR removed any nullable type from the union before adding it to the reference map (as the reference map is only use to indicate a symbol was used in a given location, I think this makes sense).
@muglug muglug merged commit 11af82a into vimeo:master Jul 11, 2020
@muglug
Copy link
Collaborator

muglug commented Jul 11, 2020

Thanks!

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

Successfully merging this pull request may close these issues.

None yet

2 participants