Files
Nim/tests/lent/t17621.nim
flywind e406e28738 fix #16898 #17621 (#17628)
* fix #16898
* fix #17621

* Update compiler/semtypes.nim
2021-04-06 18:01:54 +02:00

16 lines
269 B
Nim

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)