summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2017-11-18 22:13:46 +0100
committerAndreas Rumpf <rumpf_a@web.de>2017-11-18 22:13:46 +0100
commita9ac24169167246dea63605a8556ae9b6629c66e (patch)
tree4762085660bbf1a3590c2f6d19c92d0e83f72a62 /tests
parent3fdb78fe80cf29f54ef222f035aece6f6190cdc4 (diff)
downloadNim-a9ac24169167246dea63605a8556ae9b6629c66e.tar.gz
fixes #6073
Diffstat (limited to 'tests')
-rw-r--r--tests/types/tyet_another_generic_regression.nim13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/types/tyet_another_generic_regression.nim b/tests/types/tyet_another_generic_regression.nim
new file mode 100644
index 000000000..914166e06
--- /dev/null
+++ b/tests/types/tyet_another_generic_regression.nim
@@ -0,0 +1,13 @@
+import system
+
+type Bar[T] = ref object
+ value: T
+
+type types = int32|int64 # if I change this to just int32 or int64 it works (compiles)
+
+# if I replace Bar everywhere with seq it also compiles fine
+proc Foo[T: Bar[types]](): T =
+ when T is Bar: nil
+
+discard Foo[Bar[int32]]()
+#bug #6073