[Issue 9235] Template mixin doesn't allow to mixin non-conflicting overloads

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Feb 14 08:15:39 PST 2013


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



--- Comment #5 from Kenji Hara <k.hara.pg at gmail.com> 2013-02-14 08:15:38 PST ---
(In reply to comment #3)
> Signature constraints are ignored also for structures:
[snip]

It is not valid code, because 

> struct Foo
> {
>     A a;
>     B b;
>     alias a.foo foo;
>     alias b.foo foo;
> }

is just same as:

  struct Foo
  {
      A a;
      B b;
      alias A.foo foo;  // alias doesn't handle context *expression*
      alias B.foo foo;  // so 'a' and 'b' are simply truncated.
  }

Then, 

>     Foo f;
>     f.foo!"a"();

is identical with:

      A.foo!"a"();

But A.foo requires a valid 'this' expression, so compilation fails.

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