summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/generics/tobjecttyperel3.nim12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/generics/tobjecttyperel3.nim b/tests/generics/tobjecttyperel3.nim
new file mode 100644
index 000000000..3d8079e28
--- /dev/null
+++ b/tests/generics/tobjecttyperel3.nim
@@ -0,0 +1,12 @@
+discard """
+  output: '''OK'''
+"""
+#bug #5632
+type
+  Option*[T] = object
+  
+proc point*[A](v: A, t: typedesc[Option[A]]): Option[A] =
+  discard
+  
+discard point(1, Option)
+echo "OK"
\ No newline at end of file