[Issue 2486] taking address of slice rvalue is valid
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Feb 23 02:39:12 PST 2012
http://d.puremagic.com/issues/show_bug.cgi?id=2486
--- Comment #4 from Kenji Hara <k.hara.pg at gmail.com> 2012-02-23 02:38:57 PST ---
I found related bug that returning slice by auto ref causes an error.
----
struct S
{
int[] a;
auto ref opSlice(){ return a[]; } // line 4
}
void main()
{
S s;
s[];
}
Output:
----
test.d(4): Error: slice expression this.a[] is not a modifiable lvalue
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list