We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
type Vehicle[C: static[int]] = object color: array[C, int] Car[C: static[int]] {.borrow: `.`.} = distinct Vehicle[C] MuscleCar = Car[128]
The manual says {.borrow: ..} can works with distinct object, but apparently not with distinct generic object.
{.borrow:
.}
Nim Compiler Version 1.6.12 [Windows: amd64] Compiled at 2023-06-04 Copyright (c) 2006-2023 by Andreas Rumpf
git hash: 1aa9273 active boot switches: -d:release
Nim Compiler Version 1.9.3 [Windows: amd64] Compiled at 2023-06-04 Copyright (c) 2006-2023 by Andreas Rumpf
git hash: 25fe412 active boot switches: -d:release
$> Error: only a 'distinct' type can borrow `.`
no error
No response
The text was updated successfully, but these errors were encountered:
.
{.borrow.}
Successfully merging a pull request may close this issue.
Description
The manual says
{.borrow:
..}
can works with distinct object, but apparently not with distinct generic object.Nim Version
Nim Compiler Version 1.6.12 [Windows: amd64]
Compiled at 2023-06-04
Copyright (c) 2006-2023 by Andreas Rumpf
git hash: 1aa9273
active boot switches: -d:release
Nim Compiler Version 1.9.3 [Windows: amd64]
Compiled at 2023-06-04
Copyright (c) 2006-2023 by Andreas Rumpf
git hash: 25fe412
active boot switches: -d:release
Current Output
Expected Output
Possible Solution
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered: