Add nkFastAsgn into semExpr (#20939)
* Add nkFastAsgn into case statement * Add test case
This commit is contained in:
parent
5a848a0707
commit
d26b1232ee
2 changed files with 13 additions and 1 deletions
12
tests/magics/t20938.nim
Normal file
12
tests/magics/t20938.nim
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
discard """
|
||||
cmd: "nim c --mm:refc $file"
|
||||
action: "compile"
|
||||
"""
|
||||
|
||||
template foo(x: typed) =
|
||||
discard x
|
||||
|
||||
foo:
|
||||
var x = "hello"
|
||||
x.shallowCopy("test")
|
||||
true
|
||||
Loading…
Add table
Add a link
Reference in a new issue