solargraph
solargraph copied to clipboard
At alpha typechecking level, warn on method calls off of nilable types
Require that all unique types of a complex type offer the same method before it can match when "loose unions" mode is turned off.
Depends on:
- #1012
Included to fix build:
- https://github.com/castwide/solargraph/pull/1120
Realistically, there's enough return if foo.nil? code out there that this will probably have to wait until we have flow-sensitive typing. If that end up being difficult, I may propose hiding this under a --level={alpha,beta} level or somesuch. Long term we may want a flag to turn on new checks introduced between major releases, to help keep folks from being broken when we introduce things? Not sure.