-
Notifications
You must be signed in to change notification settings - Fork 15
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
Vector.opIndex violates return #64
Comments
I'm confused. When does |
In this case it applies, and it means that the value |
I've made a forum post about it: https://forum.dlang.org/post/nbbtdbgifaurxoknyeuu@forum.dlang.org |
I have a headache now... but thanks for taking the time to write the post and in so much detail. It seems you're arguing in the post that it's currently impossible to write opIndex correctly? That is, how should this issue should be resolved in the context of automem? |
You have to remove |
automem/source/automem/vector.d
Lines 208 to 213 in 8f61747
The signature is incorrect. Because
this
is passed byref
and the function returns byref
, the function isreturn-ref
so it may return the address ofthis
(this._elements
), but not the value (this._elements[i]
).Blocking dlang/dmd#12665 (comment)
The text was updated successfully, but these errors were encountered: