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 name resolver for class/module-alias #2344

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ksss
Copy link
Collaborator

@ksss ksss commented Mar 23, 2025

Fix #2293

Before

module M
  module N
  end

  # 2. Found the `::M::N2` and search the the `N`(`entry.decl.old_name`).
  # 3. The `::N` is nothing.
  module N2 = N 
end

class C
  # 1. Validate command search the `::M::N2`
  # 4. Report "The `M::N2` is not found".
  include M::N2
end

After

module M
  module N
  end

  # 2. Found `::M::N2` and search the `N`.
  # 3. `::N` is nothing.
  # 4. Search  the `::M::N`. (from `entry.outer`)
  # 5. Found the `::M::N`.
  module N2 = N 
end

class C
  # 1. Validate command search the `::M::N2`
  # 6. `M::N2` resolved by `::M::N`.
  include M::N2
end

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

Successfully merging this pull request may close these issues.

Can't find module alias defined in module
1 participant