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

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -