summary refs log tree commit diff stats
path: root/tests/reject
diff options
context:
space:
mode:
Diffstat (limited to 'tests/reject')
-rw-r--r--tests/reject/tbindtypedesc.nim12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/reject/tbindtypedesc.nim b/tests/reject/tbindtypedesc.nim
new file mode 100644
index 000000000..d6fbae537
--- /dev/null
+++ b/tests/reject/tbindtypedesc.nim
@@ -0,0 +1,12 @@
+discard """
+  line: 11
+  file: "tbindtypedesc.nim"
+  errormsg: "type mismatch: got (typedesc[float], string)"
+"""
+
+proc foo(T: typedesc; some: T) =
+  echo($some)
+
+foo int, 4
+foo float, "bad"
+