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:
parent
ab9969ed3b
commit
a49b06a52a
10 changed files with 210 additions and 55 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue