mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-30 01:44:37 +00:00
* 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
18 lines
328 B
Nim
18 lines
328 B
Nim
discard """
|
|
action: reject
|
|
"""
|
|
|
|
type Foo = ref object
|
|
val: int
|
|
|
|
proc divmod(a, b: Foo): (Foo, Foo) =
|
|
(
|
|
Foo(val: a.val div b.val),
|
|
Foo(val: a.val mod b.val)
|
|
)
|
|
|
|
block:
|
|
let a {.compileTime.} = Foo(val: 2)
|
|
let b {.compileTime.} = Foo(val: 3)
|
|
let (c11634 {.compileTime.}, d11634 {.compileTime.}) = divmod(a, b)
|