diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2018-10-12 20:36:42 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2018-10-12 20:36:42 +0200 |
commit | fcca59e415fe2f3ccbd5c4a977b65305e80f83e8 (patch) | |
tree | 29cf2bb8088e0981afa9acce7406aef941c61ccb /tests/destructor/tmatrix.nim | |
parent | 2fecf4f36a39049e2d21065929f44dff38cf7d5a (diff) | |
download | Nim-fcca59e415fe2f3ccbd5c4a977b65305e80f83e8.tar.gz |
destructors: optimize more assignments into moves; also fixes #9294
Diffstat (limited to 'tests/destructor/tmatrix.nim')
-rw-r--r-- | tests/destructor/tmatrix.nim | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/tests/destructor/tmatrix.nim b/tests/destructor/tmatrix.nim index ba08ec4d6..a16bfa37b 100644 --- a/tests/destructor/tmatrix.nim +++ b/tests/destructor/tmatrix.nim @@ -1,6 +1,7 @@ discard """ - output: '''after 3 3 -after 3 3 + output: '''after 2 2 +after 2 2 +after 2 2 after 2 2''' """ # bug #9263 @@ -107,6 +108,11 @@ proc test3 = # a = a - b b = -b + a +proc test4 = + # bug #9294 + var a = matrix(5, 5, 1.0) + a = -a + a + test1() info() @@ -115,3 +121,6 @@ info() test3() info() + +test4() +info() |