Can variable type in Crystal lang be restricted to classes that inherit from one class -


i mean:

class foo; end class bar < foo; end class cux < foo; end 

is possible restrict type of variable classes inheriting foo without unions, x : foo+?

maybe using type restriction?

@x : foo 

Comments

Popular posts from this blog

android - net_scheduler holding wakelock -

sql - MySQL : Getting Entries from a many-to-many table -

java - Retrieving data from database using jsp (Hibernate + Spring + Maven) -