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

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Nov 3 04:05:24 PDT 2011


http://d.puremagic.com/issues/show_bug.cgi?id=2889


Trass3r <mrmocool at gmx.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID


--- Comment #3 from Trass3r <mrmocool at 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: -------


More information about the Digitalmars-d-bugs mailing list