-
-
Notifications
You must be signed in to change notification settings - Fork 409
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
Use symbol table from definition scope when looking up references from default method bodies #4027
Conversation
The actual implementation code needs to get cleaned up. It's a copy n paste to make sure all tests are passing in CI situation at the moment. |
Hi @SeanTAllen, The changelog - fixed label was added to this pull request; all PRs with a changelog label need to have release notes included as part of the PR. If you haven't added release notes already, please do. Release notes are added by creating a uniquely named file in the The basic format of the release notes (using markdown) should be:
Thanks. |
When this is squashed and merged, the top comment should be used as the commit comment. |
We've had issues with symbols within trait and interface default method bodies. If symbols used within those bodies were not available in the local scope that the method bodies were added to, the symbols couldn't be found.
The issue was that we were only searching the local scope.
This change adds an additional AST symbol lookup strategy where we look for a function or behavior as our parent. If one exists, we check to see if it was provided by a trait. This is done by looking to see if the AST data is present. If it is, then that is the AST for original trait implementation of the method. We can then use that AST node to find symbols that were present at the original declaration site of the trait.
Fixes #3737
Fixes #2150