-
-
Notifications
You must be signed in to change notification settings - Fork 63
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
__newindex #205
Comments
Support for You can use local Farce = @record{x: integer}
function Farce:__atindex(x: auto): *integer
return &self.x
end
local bleb: Farce
print(bleb["snert"])
bleb["snert"] = 32 |
Yes. It definitely should not emit invalid C lol.
I don't understand what is going on with this one. Its returning the reference to the call site which is then modifying it? In Nim all of our operators are just syntactic sugar. |
The following test code results in invalid C code being generated:
There should be a corresponding
__newindex
for index assignment to go with__index
.This was tested against revision 5fea733
The text was updated successfully, but these errors were encountered: