diff options
author | Adam Strzelecki <ono@java.pl> | 2015-05-13 19:01:41 +0200 |
---|---|---|
committer | Adam Strzelecki <ono@java.pl> | 2015-05-13 19:10:54 +0200 |
commit | a8fbaf917b854876a01782c644e01ab2e90c5d9f (patch) | |
tree | 8167c4cc1854b9d2c894e2cec97f337697a62bf8 | |
parent | 179d82c55bda199b32a108f4ba474f47a83584c9 (diff) | |
download | Nim-a8fbaf917b854876a01782c644e01ab2e90c5d9f.tar.gz |
Tests for static class proc, methods & iterators
This currently covers #2662 & #2710 bugs.
-rw-r--r-- | tests/metatype/ttypedesc3.nim | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/metatype/ttypedesc3.nim b/tests/metatype/ttypedesc3.nim new file mode 100644 index 000000000..3d40b25b2 --- /dev/null +++ b/tests/metatype/ttypedesc3.nim @@ -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 |