[Issue 5363] const + alias this = wrong code

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Jun 21 19:41:01 PDT 2011


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


Kenji Hara <k.hara.pg at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |k.hara.pg at gmail.com


--- Comment #1 from Kenji Hara <k.hara.pg at gmail.com> 2011-06-21 19:36:13 PDT ---
More simple case:
----
struct S
{
    int dummy;
    alias dummy this;
}
int foo(int){ return 1; }
int foo(const(S)){ return 2; }
void main()
{
    S s;
    assert(foo(s) == 2);
}
----

It is the reason of this problem that the type matching levels through normal
and alias this have same basis.

-- 
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