summary refs log tree commit diff stats
path: root/tests/ccgbugs
diff options
context:
space:
mode:
authorringabout <43030857+ringabout@users.noreply.github.com>2023-11-26 01:27:27 +0800
committerGitHub <noreply@github.com>2023-11-25 18:27:27 +0100
commit379299a5ac06f67863525fe253f3de4a4e01ff01 (patch)
tree11f165e478cfd206a0dabf568a9ccbe866e42a1b /tests/ccgbugs
parent502a4486aeb8d0a5dcdf86540522d3dc16960536 (diff)
downloadNim-379299a5ac06f67863525fe253f3de4a4e01ff01.tar.gz
fixes #22286; enforce Non-var T destructors by `nimPreviewNonVarDestructor` (#22975)
fixes #22286
ref https://forum.nim-lang.org/t/10642

For backwards compatibilities, we might need to keep the changes under a
preview compiler flag. Let's see how many packags it break.

**TODO** in the following PRs

- [ ] Turn the `var T` destructors warning into an error with
`nimPreviewNonVarDestructor`

---------

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
Diffstat (limited to 'tests/ccgbugs')
-rw-r--r--tests/ccgbugs/tforward_decl_only.nim3
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/ccgbugs/tforward_decl_only.nim b/tests/ccgbugs/tforward_decl_only.nim
index d62c36b18..b115dcbe7 100644
--- a/tests/ccgbugs/tforward_decl_only.nim
+++ b/tests/ccgbugs/tforward_decl_only.nim
@@ -1,6 +1,5 @@
 discard """
-ccodecheck: "\\i !@('struct tyObject_MyRefObject'[0-z]+' {')"
-ccodecheck: "\\i !@('mymoduleInit')"
+ccodecheck: "\\i !@('struct tyObject_MyRefObject'[0-z]+' _')"
 output: "hello"
 """