Tests for static class proc, methods & iterators
This currently covers #2662 & #2710 bugs.
This commit is contained in:
parent
179d82c55b
commit
a8fbaf917b
1 changed files with 19 additions and 0 deletions
19
tests/metatype/ttypedesc3.nim
Normal file
19
tests/metatype/ttypedesc3.nim
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
import typetraits
|
||||||
|
|
||||||
|
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]) = yield "yield " & T.name
|
||||||
|
|
||||||
|
Base.pr
|
||||||
|
Child.pr
|
||||||
|
|
||||||
|
Base.me
|
||||||
|
when false:
|
||||||
|
Child.me #<- bug #2710
|
||||||
|
|
||||||
|
for s in Base.it: echo s
|
||||||
|
for s in Child.it: echo s #<- bug #2662
|
||||||
Loading…
Add table
Add a link
Reference in a new issue