Files
Nim/tests/tuples/mnimsconstunpack.nim
metagn 2315b01ae6 tuple unpacking for vars as just sugar, allowing nesting (#21563)
* tuple unpacking for vars as just sugar, allowing nesting

* set temp symbol AST

* hopeful fix some issues, add test for #19364

* always use temp for consts

* document, fix small issue

* fix manual indentation

* actually fix manual

* use helper proc

* don't resem temp tuple assignment
2023-03-28 17:52:23 +02:00

5 lines
79 B
Nim

proc foo(): tuple[a, b: string] =
result = ("a", "b")
const (a, b*) = foo()