Implement the is operator for the new static and typedesc type classes

This also makes the first baby steps towards a sound treatment of
higher-order kinds (type type int).

Adds test cases showcasing the new features.

* Also fixes breakage after the rebase
This commit is contained in:
Zahary Karadjov 2018-04-23 17:23:14 +03:00
commit a49b06a52a
10 changed files with 210 additions and 55 deletions

View file

@ -4,9 +4,9 @@ type
Base = object of RootObj
Child = object of Base
proc pr(T: typedesc[Base]) = echo "proc " & T.name
method me(T: typedesc[Base]) = echo "method " & T.name
iterator it(T: typedesc[Base]): auto = yield "yield " & T.name
proc pr(T: type[Base]) = echo "proc " & T.name
method me(T: type[Base]) = echo "method " & T.name
iterator it(T: type[Base]): auto = yield "yield " & T.name
Base.pr
Child.pr