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

internal error: environment misses: on default value for generic function #20916

Open
arnetheduck opened this issue Nov 25, 2022 · 1 comment

Comments

@arnetheduck
Copy link
Contributor

arnetheduck commented Nov 25, 2022

What happened?

type
  SomeX = object
    v: int


proc f(_: type int, x: SomeX, v = x.v) =
  echo v

proc a(): proc() =
  let v = SomeX(v: 42)
  var tmp = proc() =
    int.f(v)
  tmp

a()()
testit.nim(6, 35) Error: internal error: environment misses: x

Nim Version

1.6.8

Current Standard Output Logs

No response

Expected Standard Output Logs

No response

Possible Solution

No response

Additional Information

No response

@bung87
Copy link
Collaborator

bung87 commented Aug 11, 2023

v = x.v this part is not implemented, neither in lambda lifting nor proc declaration. not certain.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants