DIP66 - Multiple alias this
IgorStepanov via Digitalmars-d
digitalmars-d at puremagic.com
Sat Oct 11 07:23:12 PDT 2014
On Saturday, 11 October 2014 at 00:00:48 UTC, Walter Bright wrote:
> On 10/10/2014 4:23 PM, IgorStepanov wrote:
>> On Friday, 10 October 2014 at 22:50:25 UTC, Walter Bright
>> wrote:
>>> must be an error, even if one of C.a() or C.b() might be a
>>> "better" match.
>>> This is how things work for template mixins and imports.
>> So it is.
>
> Good!
>
> The same rule applies for overloading.
I've implemented overloading:
https://github.com/D-Programming-Language/dmd/pull/3998/files#diff-17b22eae29e74ce6ec29037438b5031cR2136
Please, tell me, what changes should I make to the DIP as a
result of yesterday's discussions.
And please, tell your opinion about "is" issue:
class A
{
int i;
alias i this;
}
class B
{
int i;
alias i this;
}
class C
{
A a;
B b;
alias a this;
alias b this;
}
void foo(T)(T arg) if(is(T : int))
{
...
}
foo(C()); //Should it pass or not?
More information about the Digitalmars-d
mailing list