Reputation: 725
I mean:
class Foo; end class Bar < Foo; end class Cux < Foo; end
Is it possible to restrict type of the variable to classes inheriting from Foo without unions, something like x : Foo+?
Foo
x : Foo+
Upvotes: 0
Views: 109
Reputation: 2926
Maybe using a type restriction?
@x : Foo
Upvotes: 1