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

interp: fix type selector precedence #1248

Merged
merged 3 commits into from
Sep 15, 2021

Conversation

nrwiersma
Copy link
Contributor

@nrwiersma nrwiersma commented Sep 10, 2021

The current nodeType selector precedence is heavy handed in favour of package type. It seems to often create typeSym symbols as variable types in the scope will never be found. To fix this if the ancestor node is a field expression, the package type is searched for. After this, if the type is still nil the normal scope is searched using nodeType2.

Fixes #1158

@nrwiersma nrwiersma marked this pull request as ready for review September 13, 2021 16:44
Copy link
Member

@mvertes mvertes left a comment

Choose a reason for hiding this comment

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

LGTM

@mvertes mvertes added area/core bug Something isn't working labels Sep 15, 2021
@mvertes mvertes added this to the v0.10.x milestone Sep 15, 2021
@traefiker traefiker merged commit 5af51ae into traefik:master Sep 15, 2021
@nrwiersma nrwiersma deleted the fix-type-selector branch September 15, 2021 10:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/core bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

panic when import golang.org/x/text
3 participants