nim-works / nimskull

An in development statically typed systems programming language; with sustainability at its core. We, the community of users, maintain it.
https://nim-works.github.io/nimskull/index.html
Other
279 stars 39 forks source link

objects containing `lent T` cannot be used as parameters #1459

Open alaviss opened 2 months ago

alaviss commented 2 months ago

Example

{.experimental: "views".}
type
  O = object
    value: lent int

proc foo(x: O) = discard

Actual Output

test.nim(6, 9) Error: invalid type: 'lent int' in this context: 'proc (x: O)' for proc

Expected Output

Compiles