Given the following code:
class Foo
def root_method; end
end
module Other
class Foo
def other_method; end
end
# @type [Foo]
var1 = get_other_foo
# @type [::Foo]
var2 = get_foo
end
Since var1 is declared inside Other, its type should be resolved as the nearest match, Other::Foo. Since var2's type has a namespace prefix, its type should be the root Foo class. In v0.28.4, this works correctly when inferring the variable's type (e.g., in a hover), but requesting completions for var2 erroneously returns Other::Foo instance methods.
This bug is fixed in the master branch and is scheduled for inclusion in v0.29.0.
@castwide, on master I still have this issue.
@gencer Do you have an example? When I test the above code, it correctly gives me Other::Foo methods for var1 and Foo methods for var2.


@castwide, I've sent you an another project. This time I included multiple files from my project. Please have a look at your email and hope you can reproduce at on your end.
BTW, When I try your example, yes, it just works. However, within my existing project it doesn't. Email sent.
Instructions:
@gencer This case might be stretching Solargraph's limits. Neither the Comment class in app/models/comment.rb nor its superclass Sequel::Model have methods that can be detected through static analysis.
I hope to improve support for Rails conventions in particular--e.g., recognizing that has_many :users exposes a users method--but it has a long way to go.
Oh my goodness! If you didn't say this I wouldn't aware of that /_sequel/Comment.rb doesn't exists.
Totally false alarm here. I put Comment.rb that auto generate from database (you can see others in _sequel/ dir. And it just worked.
See, I know that Solargraph doesn't well work with Rails thing. So I generate helper methods myself. I just did not generate Comment.rb yet.
I'm so sorry for this confusion.
Work here:

So, this issue is fixed in master as you stated.
Ah! Thanks for the followup. Glad you caught it.
Fix released in v0.29.0.
Most helpful comment
Oh my goodness! If you didn't say this I wouldn't aware of that /_sequel/Comment.rb doesn't exists.
Totally false alarm here. I put
Comment.rbthat auto generate from database (you can see others in_sequel/dir. And it just worked.See, I know that Solargraph doesn't well work with Rails thing. So I generate helper methods myself. I just did not generate
Comment.rbyet.I'm so sorry for this confusion.
Work here:

So, this issue is fixed in master as you stated.