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

Resolve super type name in outer context #856

Merged
merged 1 commit into from Dec 23, 2021
Merged

Resolve super type name in outer context #856

merged 1 commit into from Dec 23, 2021

Conversation

soutaro
Copy link
Member

@soutaro soutaro commented Dec 23, 2021

Fixes #764 for better compatibility with Ruby.

Note that other type names --self types and generics upper bounds-- continue to be resolved in inner context. This is intentional that we often write types like the following:

module Foo : _Fooable
  interface _Fooable
    def foo: () -> void
  end
end

The _Fooable interface is only used by the Foo module, and we may want to keep it in the module.

@soutaro soutaro merged commit fd93f84 into master Dec 23, 2021
@soutaro soutaro deleted the super-scope branch December 23, 2021 11:11
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.

Resolve logic for superclass/self-types differs from Ruby
1 participant