solargraph icon indicating copy to clipboard operation
solargraph copied to clipboard

Better flow-sensitive typing

Open apiology opened this issue 3 months ago • 1 comments

Cases now at least partially handled:

  • if foo.nil?
  • if foo
  • unless foo.nil? || foo
  • if unrelated && foo
  • break if foo.nil?
  • return foo unless !foo
  • return if foo.nil?
  • foo = nilable || not_nilable
  • foo unless foo.nil? || foo
  • foo if unrelated && foo
  • while foo
  • foo unless unrelated || repr.nil?
  • break unless is_a?
  • case ... when ... return if ...

Includes for functionality:

  • https://github.com/castwide/solargraph/pull/1119

Includes for convenience:

  • https://github.com/castwide/solargraph/pull/1102

Includes for better testing:

  • https://github.com/castwide/solargraph/pull/1087

Includes for buildability:

  • https://github.com/castwide/solargraph/pull/1120

apiology avatar Oct 09 '25 12:10 apiology

I'm pulling good bits out of https://github.com/apiology/solargraph/pull/12 - feel free to merge this PR at any point that it's green, I'll probably add more stuff over time while I improve the other PR.

apiology avatar Oct 11 '25 19:10 apiology