Files
Nim/tests/system/tensuremove2.nim
ringabout 4c89223171 relax the parameter of ensureMove; allow let statements (#22466)
* relax the parameter of `ensureMove`; allow let statements

* fixes the test
2023-08-12 13:23:54 +02:00

15 lines
253 B
Nim

discard """
errormsg: "Nested expressions cannot be moved: 'if true: s else: String()'"
"""
type
String = object
id: string
proc hello =
var s = String(id: "1")
var m = ensureMove(if true: s else: String())
discard m
discard s
hello()