summary refs log tree commit diff stats
path: root/tests/destructor
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2019-08-12 13:58:35 +0200
committerAraq <rumpf_a@web.de>2019-08-12 13:58:35 +0200
commit289b5e9ef93cd350e75f4d90d264e56df64c5a8d (patch)
tree21f47f7c927cb3e9cde69cdd4e52c39c81cc99a5 /tests/destructor
parentc9c28bf85ee428e710a510a9825e514d30b0e298 (diff)
downloadNim-289b5e9ef93cd350e75f4d90d264e56df64c5a8d.tar.gz
fixes #11254
Diffstat (limited to 'tests/destructor')
-rw-r--r--tests/destructor/tnewruntime_misc.nim6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/destructor/tnewruntime_misc.nim b/tests/destructor/tnewruntime_misc.nim
index 2bdae5c8b..1fb5b0151 100644
--- a/tests/destructor/tnewruntime_misc.nim
+++ b/tests/destructor/tnewruntime_misc.nim
@@ -52,5 +52,11 @@ type
       x*: int
 var t: MyType
 
+# bug #11254
+proc test(p: owned proc()) =
+  let x = (proc())p
+
+test(proc() = discard)
+
 let (a, d) = allocCounters()
 discard cprintf("%ld  new: %ld\n", a - unpairedEnvAllocs() - d, allocs)