Skip to content

lent T causes error when used as generic parameter #1458

Open
@alaviss

Description

@alaviss

Example

{.experimental: "views".}
type O[T] = object

O[lent int]()

Actual Output

test.nim(4, 8) Error: type mismatch: got 'typedesc[int]' for 'int' but expected 'lent'

Expected Output

No error

Additional Information

  • If an indirection via type Lint = lent int and Option[Lint] is done, nothing bad will happen.

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