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

Subscript notation [] doesn't work with property procs #237

Closed
gradha opened this issue Oct 22, 2012 · 2 comments
Closed

Subscript notation [] doesn't work with property procs #237

gradha opened this issue Oct 22, 2012 · 2 comments
Labels

Comments

@gradha
Copy link
Contributor

gradha commented Oct 22, 2012

Following the information about reference and pointer types in the first part of the tutorial and mixing it with the properties section of the second part of the tutorial I found out that the subscript notation doesn't work with the property methods which are meant to hide the real variables.

I'm writting these procs because I want to export them to C (see http://forum.nimrod-code.org/t/96), but it seems that I'm forced to use then the notation object[].accesor which is discouraged in the first part of the tutorial. See the coments in the test case I came up with at https://github.com/gradha/Nimrod/commit/fafb645265e0072bcd1b580ad129272540259ff4 where I would expect the code from both PNormal and PPrivate to work the same, but the compiler barks on the use of PPrivate.

@Araq
Copy link
Member

Araq commented Oct 22, 2012

Auto-deref is a planned feature...

@Araq
Copy link
Member

Araq commented Apr 4, 2016

Auto-deref works with .experimental.

@Araq Araq closed this as completed Apr 4, 2016
Clyybber added a commit to Clyybber/Nim that referenced this issue Feb 24, 2022
237: Enable debugging unreported errors r=Clyybber a=Clyybber

## Summary
Enabled with -d:nimDebugUnreportedErrors
Doesn't keep track of where the nodes were created yet.
Also fix semIf not handling nkError nodes correctly.
Also cleanup buildErrorList/walkErrors roundabout way
of doing post-visit DFS.
Also improve rsemTypeKindMismatch error message.

Co-authored-by: Clyybber <darkmine956@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants