DIP1000: 'return scope' ambiguity and why you can't make opIndex work
Walter Bright
newshound2 at digitalmars.com
Tue Jul 6 09:33:29 UTC 2021
Added PRs:
https://github.com/dlang/dmd/pull/12817
https://github.com/dlang/dmd/pull/12819
This, of course, breaks:
struct Vector {
float[] _elements;
ref float opIndex(size_t i) scope return {
return this._elements[i];
}
}
as Dennis points out. It still is the correct fix, however, we just have to find
a way to get opIndex to work.
More information about the Digitalmars-d
mailing list