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

Support extended scopes that are parameterized types #4524

Merged
merged 13 commits into from
Nov 14, 2024

Conversation

josh11b
Copy link
Contributor

@josh11b josh11b commented Nov 13, 2024

  • The extended_scopes in a NameScope were represented by a NameScopeId. Replace that with an InstId of an instruction returning the type that is extending this name scope.
  • Context::LookupQualifiedName now can take multiple scopes to look in.
  • GetAsLookupScope was moved out of member_access.cpp and is now Context::AppendLookupScopesForConstant

This PR also fixes some existing issues that were revealed as part of writing and testing this PR:

  • Additional validation and handling of invalid ids.
  • extend impl in a class is not properly imported yet, but at least now it doesn't crash.

The change to use an InstId also allowed some diagnostics and formatting to be improved.

toolchain/check/member_access.cpp Outdated Show resolved Hide resolved
@josh11b josh11b added this pull request to the merge queue Nov 13, 2024
Merged via the queue into carbon-language:trunk with commit abd12c1 Nov 14, 2024
8 checks passed
@josh11b josh11b deleted the lookup branch November 14, 2024 00:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants