Shopify / ruby-lsp-rails

A Ruby LSP addon for Rails
https://shopify.github.io/ruby-lsp-rails/
MIT License
518 stars 21 forks source link

Prevent crash during ActiveRecord const check #328

Closed andyw8 closed 2 months ago

andyw8 commented 2 months ago

I'm not exactly sure how it was triggered, but I had crash for this:

undefined method `<' for an instance of T::Private::Types::TypeAlias (NoMethodError)

I'll add a test if I'm able to reproduce.

andyw8 commented 2 months ago

Updated based on @vinistock's suggestion, and I added a test.

st0012 commented 2 months ago

BTW, is bug the right label? I thought we use bugfix?

andyw8 commented 2 months ago

I corrected the label.

It'd be great to have some test cases around it if the setup is not too complicated.

I added a test with my update, is there something else you had in mind?

st0012 commented 2 months ago

is there something else you had in mind?

Oh sorry I must've clicked into just a specific commit. All good then 👍