summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorZahary Karadjov <zahary@gmail.com>2014-02-15 20:44:01 +0200
committerZahary Karadjov <zahary@gmail.com>2014-02-15 20:44:01 +0200
commitc1f1f841946dce9454e6971e9ce30115789cfb61 (patch)
tree72da85164e84ef8d43c93f9adb69bc57ce35c737 /tests
parentc1c6b6e50e3755f25f734c0e55b6b81f51a7852c (diff)
downloadNim-c1f1f841946dce9454e6971e9ce30115789cfb61.tar.gz
fix some regressions caused by tyTypeDesc[tyNone]
Diffstat (limited to 'tests')
-rw-r--r--tests/metatype/tusertypeclasses.nim13
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))
+