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

Static + distinct: Cannot borrow when static is involved #7552

Closed
mratsim opened this issue Apr 9, 2018 · 1 comment · Fixed by #18904
Closed

Static + distinct: Cannot borrow when static is involved #7552

mratsim opened this issue Apr 9, 2018 · 1 comment · Fixed by #18904

Comments

@mratsim
Copy link
Collaborator

mratsim commented Apr 9, 2018

Test case:

type
  Foo = distinct seq[int]

  Bar[N: static[int]] = distinct seq[int]


proc newSeq(s: var Foo, n: Natural) {.borrow.} # works

proc newSeq(s: var Bar, n: Natural) {.borrow.} # Error: no symbol to borrow from found
# proc newSeq[N: static[int]](s: var Bar[N], n: Natural) {.borrow.} # Same error
@cooldome
Copy link
Member

cooldome commented Apr 9, 2018

May work with PR #6232

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

Successfully merging a pull request may close this issue.

3 participants