You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
deffooyieldend
bar =rand>0.5?42 : nilif b = bar
c =->() { puts"hello #{b.succ}" } # => undefined method 'succ' for Nil (compile-time type is (Int32 | Nil))
foo(&c)
end
Since b is restricted to Int32 in this condition branch, the closure should also capture it as an Int32, not (Int32 | Nil).
Since
b
is restricted toInt32
in this condition branch, the closure should also capture it as anInt32
, not(Int32 | Nil)
.Probably related to: #6037
The text was updated successfully, but these errors were encountered: