summary refs log tree commit diff stats
path: root/tests/lent/t17621.nim
blob: e324a963e1dd0b84f6fae438f3e6903435df68ec (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
discard """
  errormsg: "invalid type: 'lent Test' in this context: 'proc (self: lent Test)' for proc"
"""

# bug #17621
{.experimental: "views".}

type Test = ref object
  foo: int

proc modify(self: lent Test) =
  self.foo += 1

let test = Test(foo: 12)
modify(test)