castwide / solargraph

A Ruby language server.
https://solargraph.org
MIT License
1.87k stars 154 forks source link

`solargraph typecheck --level=strong` fails for global variables #663

Open jcouball opened 1 year ago

jcouball commented 1 year ago

Is there any magic to get this to work? I am sure I am missing something simple.

If I have a directory that only contains example.rb whose contents are:

require 'English'

`true`

$?.success?

$CHILD_STATUS.success?

When I run:

solargraph typecheck --level=strong

I receive the following errors:

/Users/me/test/example.rb:5 - Unresolved call to $?
/Users/me/test/example.rb:7 - Unresolved call to $CHILD_STATUS
2 problems found.

Expected Result: no errors

I am running on Ruby 3.2.2, solargraph 0.49.0, on a Mac