Case 1
No error is expected, but the following error is reported:
#: (String) -> bool
def a(a)
return false #=> [error] expected: bool; actual: bot
end
Suppressing the error in Case 1 is relatively straightforward. whtsht@c0e142e
However, as noted in the comment, this appears to be more of a workaround than a proper fix.
For example, Case 2 cannot be resolved by the same adjustment used for Case 1.
Case 2
No error is expected, but the following error is reported:
#: (bool) -> String | Integer
def foo(a)
if a
"true"
else
return 0 # => [error] expected: String; actual: Integer
end
end