summary refs log blame commit diff stats
path: root/tests/system/tensuremove1.nim
blob: b7e19c4fb699cb3477a53b859c5b4424d27b434e (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16















                                                                
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()