Skip to content

objects containing lent T cannot be used as parameters #1459

Open
@alaviss

Description

@alaviss

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcompiler/semRelated to semantic-analysis system of the compiler

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions