class Foo
def initialize(@foo : String | Nil)
end
def foo
@foo
end
end
a = Foo.new "213"
if !a.foo.nil?
puts a.foo, typeof(a.foo)
end
get output of
213
(String | Nil)
but shouldn't type of a.foo be narrowed to String? Is this another design limit?