We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Since RBS-3.6, some core methods have been annotated as %a{implicitly-returns-nil} and do not return nil in type definitions (see ruby/rbs#1921).
%a{implicitly-returns-nil}
However Steep does not support the annotation. So it emits unexpected warnings to users.
For example, Steep emits UnreachableBranch for the following code:
UnreachableBranch
item = [1, 2, 3].first if item puts "Item is #{item}" else puts "Item is nil" end
Result:
$ bundle exec steep check --severity=information # Type checking files: .........................................................................................................................................................................................................................................................................................F. app/app.rb:5:0: [information] The branch is unreachable │ Diagnostic ID: Ruby::UnreachableBranch │ └ else ~~~~ Detected 1 problem from 1 file
Steepfile:
D = Steep::Diagnostic target :app do signature "sig" check "app" configure_code_diagnostics(D::Ruby.strict) end
Environment:
The warning is not emitted with RBS-3.5.3.
$ bundle exec steep check --severity=information # Type checking files: .......................................................................................................................................................................................................................................................................................... No type error detected. 🫖
The text was updated successfully, but these errors were encountered:
Looks like this is related to the PR: #1258
Sorry, something went wrong.
Yes. I think this is done with #1258.
Thanks!
No branches or pull requests
Since RBS-3.6, some core methods have been annotated as
%a{implicitly-returns-nil}
and do not return nil in type definitions (see ruby/rbs#1921).However Steep does not support the annotation. So it emits unexpected warnings to users.
For example, Steep emits
UnreachableBranch
for the following code:Result:
Steepfile:
Environment:
The warning is not emitted with RBS-3.5.3.
The text was updated successfully, but these errors were encountered: