Skip to content

Fix name resolver for class/module-alias#2344

Closed
ksss wants to merge 2 commits intoruby:masterfrom
ksss:class-module-alias-namespace
Closed

Fix name resolver for class/module-alias#2344
ksss wants to merge 2 commits intoruby:masterfrom
ksss:class-module-alias-namespace

Conversation

@ksss
Copy link
Copy Markdown
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

@soutaro soutaro self-assigned this May 12, 2025
@ksss ksss added this to the RBS 4.0 milestone Jul 15, 2025
@soutaro soutaro closed this in #2670 Oct 3, 2025
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.

Can't find module alias defined in module

2 participants