diff options
author | ringabout <43030857+ringabout@users.noreply.github.com> | 2023-03-16 23:06:26 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-16 16:06:26 +0100 |
commit | b5ee81fd234c690f736a8f196a234c11a32e3910 (patch) | |
tree | 4e6bc085d41a52761cbe6702206939ec89b031d3 /tests/destructor/tgotoexceptions7.nim | |
parent | 6552a27ec1e973d1e9a3e002b2e48c8206bf35a5 (diff) | |
download | Nim-b5ee81fd234c690f736a8f196a234c11a32e3910.tar.gz |
fix #18977; disallow change branch of an object variant in ORC (#21526)
* fix #18977 disallow change branch of an object variant in ORC * check errors for goto exception * fixes conditions * fixes tests * add a test case for #18977
Diffstat (limited to 'tests/destructor/tgotoexceptions7.nim')
-rw-r--r-- | tests/destructor/tgotoexceptions7.nim | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/destructor/tgotoexceptions7.nim b/tests/destructor/tgotoexceptions7.nim index 6e564a044..c04bd6ba0 100644 --- a/tests/destructor/tgotoexceptions7.nim +++ b/tests/destructor/tgotoexceptions7.nim @@ -25,7 +25,8 @@ proc helper = doAssert(false) proc main(i: int) = var obj = Obj(kind: kindA, s: "abc") - obj.kind = kindB + {.cast(uncheckedAssign).}: + obj.kind = kindB obj.i = 2 try: var objA = ObjA() |