summary refs log tree commit diff stats
path: root/tests/generics
diff options
context:
space:
mode:
authorLemonBoy <LemonBoy@users.noreply.github.com>2018-07-14 01:44:40 +0200
committerAndreas Rumpf <rumpf_a@web.de>2018-07-14 01:44:40 +0200
commit9b98add6c714474e261df1a0a17819282dfd1975 (patch)
treefd69fc408a01eb89b0e479fddb0771254dc75486 /tests/generics
parentdd47013017d75a2b1a8c80e12f273e18e86f7d72 (diff)
downloadNim-9b98add6c714474e261df1a0a17819282dfd1975.tar.gz
Do not crash while instantiating a generic outside a call (#8279)
Fixes #8270
Diffstat (limited to 'tests/generics')
-rw-r--r--tests/generics/t8270.nim7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/generics/t8270.nim b/tests/generics/t8270.nim
new file mode 100644
index 000000000..707e981fa
--- /dev/null
+++ b/tests/generics/t8270.nim
@@ -0,0 +1,7 @@
+discard """
+  line: 6
+  errormsg: "cannot instantiate: \'T\'"
+"""
+
+proc m[T](x: T): int = discard
+echo [m]