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
Dereferencing a ref type does not compile
No suitable [] implementation is found for the reference type itself. Derefencing an instance works.
[]
type MyType = object a: int b: int c: int MyRefType = ref MyType echo compiles(MyRefType[])
Remark: the compiles proc checks whether MyRefType[] compiles. As it generates false as output, it does not.
compiles
MyRefType[]
false
true
The issue came up in this thread on the Nim forum when discussing how to get the size of the underying type of a ref.
nim version 0.20.0 https://play.nim-lang.org/#ix=1OE9
The text was updated successfully, but these errors were encountered:
15d2a92
Merge pull request #11751 from nim-lang/araq-fixes-11474
326860e
fixes #11747
[bugfix] Merge pull request nim-lang#11751 from nim-lang/araq-fixes-1…
e181a70
…1474 fixes nim-lang#11747
revert the bugfix for #11747 as it really was a new, poorly though-ou…
1868cbc
…t feature
No branches or pull requests
Dereferencing a ref type does not compile
No suitable
[]
implementation is found for the reference type itself. Derefencing an instance works.Example
Remark: the
compiles
proc checks whetherMyRefType[]
compiles. As it generatesfalse
as output, it does not.Current Output
Expected Output
Possible Solution
Additional Information
The issue came up in this thread on the Nim forum when discussing how to get the size of the underying type of a ref.
nim version 0.20.0
https://play.nim-lang.org/#ix=1OE9
The text was updated successfully, but these errors were encountered: