diff options
author | Araq <rumpf_a@web.de> | 2019-08-12 13:58:35 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2019-08-12 13:58:35 +0200 |
commit | 289b5e9ef93cd350e75f4d90d264e56df64c5a8d (patch) | |
tree | 21f47f7c927cb3e9cde69cdd4e52c39c81cc99a5 /tests/destructor | |
parent | c9c28bf85ee428e710a510a9825e514d30b0e298 (diff) | |
download | Nim-289b5e9ef93cd350e75f4d90d264e56df64c5a8d.tar.gz |
fixes #11254
Diffstat (limited to 'tests/destructor')
-rw-r--r-- | tests/destructor/tnewruntime_misc.nim | 6 |
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) |