mirror of
https://github.com/nim-lang/Nim.git
synced 2026-02-12 14:23:45 +00:00
* implement `ensureMove` * use an additional flag * improve some logics * progress: fixes discard ensureMove * forbids nested expressions * improve error messages * checkpoint * fixes cursor * ADD MORE TESTS * fixes cursorinference again * tiny cleanup * improve error messages * fixes docs * implement comments add more tests * fixes js
16 lines
271 B
Nim
16 lines
271 B
Nim
discard """
|
|
errormsg: "cannot move 's', which introduces an implicit copy"
|
|
matrix: "--cursorinference:on; --cursorinference:off"
|
|
"""
|
|
|
|
type
|
|
String = object
|
|
id: string
|
|
|
|
proc hello =
|
|
var s = String(id: "1")
|
|
var m = ensureMove s
|
|
discard m
|
|
discard s
|
|
|
|
hello() |