You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The type conversion T(a) is an L-value if a is an L-value and typeEqualsOrDistinct(T, typeof(a)) holds.
which is the case here.
Because a is an L-value here, and they're all ints per that static block, T(a) should therefore also be an L-value, but it appears not to be.
Nim Version
Nim Compiler Version 1.6.14 [Linux: amd64]
Compiled at 2023-06-29
Copyright (c) 2006-2023 by Andreas Rumpf
active boot switches: -d:release
Nim Compiler Version 2.0.1 [Linux: amd64]
Compiled at 2023-08-20
Copyright (c) 2006-2023 by Andreas Rumpf
git hash: 037f536e7ee25c4baf23dff8a4525825c506442c
active boot switches: -d:release
Nim Compiler Version 2.1.1 [Linux: amd64]
Compiled at 2023-08-20
Copyright (c) 2006-2023 by Andreas Rumpf
git hash: a4781dc4bcdf6e76076af80d0b21cb09865b3d44
active boot switches: -d:release
Current Output
r.nim(19, 2) Error: type mismatch
Expression: f(T(a))
[1] T(a): T
Expected one of (first mismatch at [position]):
[1] proc f(y: var T)
Expected Output
No response
Possible Solution
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered:
Description
fails to build not for
but rather for
https://nim-lang.org/docs/manual.html#type-relations-convertible-relation states that
Because
a
is an L-value here, and they're allint
s per thatstatic
block,T(a)
should therefore also be an L-value, but it appears not to be.Nim Version
Current Output
Expected Output
No response
Possible Solution
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered: