[Issue 2889] Alias this properties don't overload with non-alias this properties.

2015-06-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=2889

Andrei Alexandrescu and...@erdani.com changed:

   What|Removed |Added

Version|2.029   |D2

--


[Issue 2889] Alias this properties don't overload with non-alias this properties.

2011-11-03 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2889


Trass3r mrmoc...@gmx.de changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID


--- Comment #3 from Trass3r mrmoc...@gmx.de 2011-11-03 04:04:51 PDT ---
Yeah, you're right.
See http://www.digitalmars.com/d/2.0/hijack.html for the rationale.
Overloading is done explicitly with alias just like you use using in C++ for
this purpose.

Unfortunately you can't alias arr.length length; in this particular case
though:
Error: alias test.ArrayWrapper.length cannot alias an expression arr.length

The only option is to use a small function that wraps arr.length I guess.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 2889] Alias this properties don't overload with non-alias this properties.

2011-08-14 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2889


Trass3r mrmoc...@gmx.de changed:

   What|Removed |Added

 CC||mrmoc...@gmx.de
   Platform|x86 |All
 OS/Version|Windows |All


--- Comment #1 from Trass3r mrmoc...@gmx.de 2011-08-14 15:01:37 PDT ---
This is also critical for proper simulation of struct inheritance.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 2889] Alias this properties don't overload with non-alias this properties.

2011-08-14 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2889


Kenji Hara k.hara...@gmail.com changed:

   What|Removed |Added

 CC||k.hara...@gmail.com


--- Comment #2 from Kenji Hara k.hara...@gmail.com 2011-08-14 15:30:58 PDT ---
I think this is a language design, not a bug.

In normal class inheritance, derived class method doesn't overload with base
class methods that have same names.

class Array  // the synonym of uint[]
{
size_t length(){ return 0; }
void length(size_t n){  }
// built-in length property (getter and setter)
}
class ArrayWrapper : Array
{
void length(uint l) {}
// length overrides Array.length, not overloads
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---