Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

objects containing lent T cannot be used as parameters #1459

Open
alaviss opened this issue Sep 10, 2024 · 0 comments
Open

objects containing lent T cannot be used as parameters #1459

alaviss opened this issue Sep 10, 2024 · 0 comments
Labels
bug Something isn't working compiler/sem Related to semantic-analysis system of the compiler

Comments

@alaviss
Copy link
Contributor

alaviss commented Sep 10, 2024

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

@alaviss alaviss added bug Something isn't working compiler/sem Related to semantic-analysis system of the compiler labels Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working compiler/sem Related to semantic-analysis system of the compiler
Projects
None yet
Development

No branches or pull requests

1 participant