diff options
author | Zahary Karadjov <zahary@gmail.com> | 2014-02-15 20:44:01 +0200 |
---|---|---|
committer | Zahary Karadjov <zahary@gmail.com> | 2014-02-15 20:44:01 +0200 |
commit | c1f1f841946dce9454e6971e9ce30115789cfb61 (patch) | |
tree | 72da85164e84ef8d43c93f9adb69bc57ce35c737 /tests | |
parent | c1c6b6e50e3755f25f734c0e55b6b81f51a7852c (diff) | |
download | Nim-c1f1f841946dce9454e6971e9ce30115789cfb61.tar.gz |
fix some regressions caused by tyTypeDesc[tyNone]
Diffstat (limited to 'tests')
-rw-r--r-- | tests/metatype/tusertypeclasses.nim | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/metatype/tusertypeclasses.nim b/tests/metatype/tusertypeclasses.nim index 4c2f07b85..4c8c0fc56 100644 --- a/tests/metatype/tusertypeclasses.nim +++ b/tests/metatype/tusertypeclasses.nim @@ -26,3 +26,16 @@ foo 10 foo "test" foo(@[TObj(x: 10), TObj(x: 20)]) +proc intval(x: int) = discard + +# check real and virtual fields +type + TFoo = generic T + intval T.x + intval T.y + +proc y(x: TObj): int = 10 + +proc testFoo(x: TFoo) = discard +testFoo(TObj(x: 10)) + |