digitalmars.D.bugs - [Issue 4993] New: Temporary values and opIndexAssign
- d-bugmail puremagic.com (45/45) Oct 04 2010 http://d.puremagic.com/issues/show_bug.cgi?id=4993
- d-bugmail puremagic.com (10/10) Mar 06 2012 http://d.puremagic.com/issues/show_bug.cgi?id=4993
- d-bugmail puremagic.com (11/11) Mar 06 2012 http://d.puremagic.com/issues/show_bug.cgi?id=4993
- d-bugmail puremagic.com (8/9) Mar 07 2012 http://d.puremagic.com/issues/show_bug.cgi?id=4993
- d-bugmail puremagic.com (10/10) Mar 17 2012 http://d.puremagic.com/issues/show_bug.cgi?id=4993
http://d.puremagic.com/issues/show_bug.cgi?id=4993
Summary: Temporary values and opIndexAssign
Product: D
Version: D2
Platform: Other
OS/Version: Windows
Status: NEW
Keywords: rejects-valid
Severity: major
Priority: P2
Component: DMD
AssignedTo: nobody puremagic.com
ReportedBy: simen.kjaras gmail.com
PDT ---
The following code does not compile. Note that the exact same functions are
present in both the inner and outer structs, and that opIndex works for both.
struct Foo{
struct Bar {
int opIndex( size_t index ) {
return 3;
}
void opIndexAssign( int value, size_t index ) {
}
}
property
auto bar( ) {
return Bar( );
}
int opIndex( size_t index ) {
return 3;
}
void opIndexAssign( int value, size_t index ) {
}
}
void main( ) {
Foo f;
f[3] = f[2];
Foo.Bar b;
b[3] = b[2];
f.bar[3] = f.bar[2]; // Fails
}
foo.d(28): Error: f.bar()[3u] is not an lvalue
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Oct 04 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4993
Nils <mailme+d nilsb.dyndns.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dsimcha yahoo.com
*** Issue 5202 has been marked as a duplicate of this issue. ***
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 06 2012
http://d.puremagic.com/issues/show_bug.cgi?id=4993
Nils <mailme+d nilsb.dyndns.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |pull
CC| |mailme+d nilsb.dyndns.org
https://github.com/D-Programming-Language/dmd/pull/791
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 06 2012
http://d.puremagic.com/issues/show_bug.cgi?id=4993https://github.com/D-Programming-Language/dmd/pull/791That one has been superseded by https://github.com/D-Programming-Language/dmd/pull/763 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Mar 07 2012
http://d.puremagic.com/issues/show_bug.cgi?id=4993
Walter Bright <bugzilla digitalmars.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |bugzilla digitalmars.com
Resolution| |FIXED
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 17 2012









d-bugmail puremagic.com 