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

Relative constants from included modules are not predicted #2579

Open
joeldrapper opened this issue Sep 19, 2024 · 0 comments
Open

Relative constants from included modules are not predicted #2579

joeldrapper opened this issue Sep 19, 2024 · 0 comments
Assignees

Comments

@joeldrapper
Copy link

If you include a module into a class, you can access that module’s relative constants from your class. However, RubyLSP does not seem to detect this pattern. In the example below, from Baz, Foo::Bar is predicted but Bar is not.

module Foo
  Bar = 1
end

class Baz
  include Foo
  
  Foo::Bar # <- this is predicted
  Bar # <- this is not predicated even though it’s available
end
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

No branches or pull requests

2 participants