Files
Nim/tests/arc
metagn 71c5a4f72c generate let _ = to fully unpack partial tuple unpacking assignment for arc (#24948)
fixes #24947

When injectdestructors detects that a variable is a tuple unpacking temp
(i.e. it is an `skTemp`, is not a cursor, and has tuple type) it does
not generate a destructor for it and only generates sink/bit assignments
for its components. However the reason it does not generate a destructor
is that it expects it to be fully unpacked, this is true for unpackings
in for loops but not for tuple unpacking assignments which supports `_`
since #22537. Tuple unpacking definitions for `var`/`let`/`const` do not
generate `skTemp` and use the same symbol kind as the definition so they
did not have this problem.

To keep this compatible, the `_` parts of the tuple unpacking
assignments are now not ignored and unpacked into `let _ = ...`, which
generates its own destructor. Another option might be to use `skLet`
instead of `skTemp` but this might cause changes to behavior like
additional copies, I am not sure about this though.
2025-05-15 09:32:10 +02:00
..
2020-07-07 22:43:36 +02:00
2020-07-07 22:43:36 +02:00
2020-07-07 22:43:36 +02:00
2020-11-12 09:28:32 +01:00
2021-03-04 19:33:16 +01:00
2023-07-06 15:15:50 +02:00
2021-10-29 19:55:48 +02:00
2022-10-02 06:44:10 +02:00
2020-11-26 10:24:52 +01:00
2020-10-19 22:25:43 +02:00
2023-06-30 14:54:46 +02:00
2020-03-09 15:32:38 +01:00
2022-10-17 23:48:51 +02:00
2020-04-22 17:34:35 +02:00
2020-09-11 01:50:42 +02:00
2021-07-27 09:36:19 +02:00
2020-09-24 15:41:45 +02:00
2020-07-04 07:37:24 +02:00
2021-07-27 14:32:56 +02:00