mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-26 17:24:02 +00:00
committed by
Andreas Rumpf
parent
bde768cb09
commit
05dec08cea
@@ -49,3 +49,13 @@ block: # Test get addr of byvar return value
|
||||
let a = addr t["hi"]
|
||||
a[] = 10
|
||||
doAssert(t["hi"] == 10)
|
||||
|
||||
block: # Test var arg inside case expression. #5244
|
||||
proc foo(a: var string) =
|
||||
a = case a
|
||||
of "a": "error"
|
||||
of "b": "error"
|
||||
else: a
|
||||
var a = "ok"
|
||||
foo(a)
|
||||
doAssert(a == "ok")
|
||||
|
||||
Reference in New Issue
Block a user