summary refs log tree commit diff stats
path: root/tests/destructor
diff options
context:
space:
mode:
authorClyybber <darkmine956@gmail.com>2020-06-19 14:56:38 +0200
committerGitHub <noreply@github.com>2020-06-19 14:56:38 +0200
commit45d1e55e72aea9acfcf1a6fb7061779a243d7921 (patch)
tree1559fd0534692a064866fa3db9b6b79a58653033 /tests/destructor
parent45bc6954c510fa9ca742cb333ce88d9625ad1e29 (diff)
downloadNim-45d1e55e72aea9acfcf1a6fb7061779a243d7921.tar.gz
Add testcases for #11811 and #14315 (#14726)
* Add testcase for #11811

* Add testcase for #14315
Diffstat (limited to 'tests/destructor')
-rw-r--r--tests/destructor/tdestructor.nim12
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/destructor/tdestructor.nim b/tests/destructor/tdestructor.nim
index b6d60323c..9fd47fe00 100644
--- a/tests/destructor/tdestructor.nim
+++ b/tests/destructor/tdestructor.nim
@@ -154,4 +154,14 @@ proc caseobj_test_sink: TCaseObj =
 
 
 echo "---"
-discard caseobj_test_sink()
\ No newline at end of file
+discard caseobj_test_sink()
+
+# issue #14315
+
+type Vector*[T] = object
+  x1: int
+  # x2: T # uncomment will remove error
+
+# proc `=destroy`*(x: var Vector[int]) = discard # this will remove error
+proc `=destroy`*[T](x: var Vector[T]) = discard
+var a: Vector[int] # Error: unresolved generic parameter