mirror of
https://github.com/nim-lang/Nim.git
synced 2026-02-12 22:33:49 +00:00
16 lines
269 B
Nim
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)
|