[Issue 19633] Identity expression produces wrong result with interface inheritance

2023-12-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19633

Basile-z  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||b2.t...@gmx.com
 Resolution|--- |DUPLICATE
   Severity|enhancement |normal

--- Comment #1 from Basile-z  ---
more comments and defunct PR in the newest report

*** This issue has been marked as a duplicate of issue 23972 ***

--


[Issue 19633] Identity expression produces wrong result with interface inheritance

2022-12-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19633

Iain Buclaw  changed:

   What|Removed |Added

   Priority|P1  |P4

--


[Issue 20756] ImplicitConversionTargets ignores interface inheritance

2021-04-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=20756

--- Comment #6 from FeepingCreature  ---
ImplicitConversionTargets has been deprecated. AllImplicitConversionTargets
supports interface inheritance.

--


[Issue 20756] ImplicitConversionTargets ignores interface inheritance

2021-04-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=20756

Dlang Bot  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #5 from Dlang Bot  ---
dlang/phobos pull request #8016 "Fix issue 20756: Handle interface argument in
`AllImplicitConversionTargets`." was merged into master:

- 3e619db79c6e4e33c2cf39de213f3a097e3d9951 by Mathis Beer:
  Fix issue 20756: Handle interface argument in `AllImplicitConversionTargets`.

https://github.com/dlang/phobos/pull/8016

--


[Issue 20756] ImplicitConversionTargets ignores interface inheritance

2021-04-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=20756

--- Comment #4 from Dlang Bot  ---
@FeepingCreature created dlang/phobos pull request #8016 "Fix issue 20756:
Handle interface argument in `AllImplicitConversionTargets`." fixing this
issue:

- Fix issue 20756: Handle interface argument in `AllImplicitConversionTargets`.

https://github.com/dlang/phobos/pull/8016

--


[Issue 17373] traits getOverloads + multiple interface inheritance only see one of the interfaces' overloads

2021-01-03 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17373

--- Comment #3 from Dlang Bot  ---
dlang/dmd pull request #12093 "[dmd-cxx] Backport more recent traits to the C++
port" was merged into dmd-cxx:

- 40ea03789d2b93aea1b2786c349bf17f6800eab4 by RazvanN7:
  [dmd-cxx] Fix Issue 17373 - traits getOverloads + multiple interface
inheritance only see one of the interfaces'
   overloads

https://github.com/dlang/dmd/pull/12093

--


[Issue 20756] ImplicitConversionTargets ignores interface inheritance

2020-05-24 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=20756

--- Comment #3 from FeepingCreature  ---
I would argue that then the documentation is another bug. A template called
"ImplicitConversionTargets" can be reasonably expected to return implicit
conversion targets.

--


[Issue 20756] ImplicitConversionTargets ignores interface inheritance

2020-05-24 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=20756

Nathan S.  changed:

   What|Removed |Added

 CC||n8sh.second...@hotmail.com
   Hardware|x86_64  |All
 OS|Linux   |All
   Severity|minor   |enhancement

--- Comment #2 from Nathan S.  ---
Changed from 'bug' to 'enhancement' since the behavior of
ImplicitConversionTargets is correct for its documentation:
```
If the type is not a built-in value type or a class derived from
`Object`, the an empty $(REF AliasSeq,std,meta) is returned.
```

--


[Issue 20756] ImplicitConversionTargets ignores interface inheritance

2020-04-21 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=20756

Dlang Bot  changed:

   What|Removed |Added

   Keywords||pull

--- Comment #1 from Dlang Bot  ---
@FeepingCreature created dlang/phobos pull request #7453 "Fix/issue 20756
implicitconversiontargets interfaces" fixing this issue:

- Fix issue 20756: support interfaces in ImplicitConversionTargets

https://github.com/dlang/phobos/pull/7453

--


[Issue 20756] New: ImplicitConversionTargets ignores interface inheritance

2020-04-21 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=20756

  Issue ID: 20756
   Summary: ImplicitConversionTargets ignores interface
inheritance
   Product: D
   Version: D2
  Hardware: x86_64
OS: Linux
Status: NEW
  Severity: minor
  Priority: P1
 Component: phobos
  Assignee: nob...@puremagic.com
  Reporter: default_357-l...@yahoo.de

Repro:

interface A { }
interface B : A { }

static assert(is(ImplicitConversionTargets!B == AliasSeq!(A)));

Expected:

AliasSeq!(A)

Got:

AliasSeq!()

To add, TransitiveBaseTypeTuple (which ImplicitConversionTargets uses) also
doesn't support interface parameters.

--


[Issue 19633] New: Identity expression produces wrong result with interface inheritance

2019-01-29 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19633

  Issue ID: 19633
   Summary: Identity expression produces wrong result with
interface inheritance
   Product: D
   Version: D2
  Hardware: x86_64
OS: Linux
Status: NEW
  Severity: enhancement
  Priority: P1
 Component: dmd
  Assignee: nob...@puremagic.com
  Reporter: dhase...@gmail.com

https://dlang.org/spec/expression.html#identity_expressions says:

"For class objects, identity is defined as the object references are for the
same object. Null class objects can be compared with is." This is one option
for comparing two interface references with `is`.

Continuing on, there are other obviously inapplicable options, leaving just the
default: "For other operand types, identity is defined as being the same as
equality." This is another option.

Test case:
---
interface A {}
interface B : A {}
class C : A, B {}
void main()
{
A a = new C;
B b = cast(B)a;
writeln(a is b);  // false
writeln(cast(Object)a is cast(Object)b);  // true
writeln(a == b);  // true
}
---

If the first option is chosen, `a is b` should have the same result as
`cast(Object)a is cast(Object)b`, which is true.

If the second option is chosen, `a is b` should have the same result as `a ==
b`, which is true.

--


[Issue 17373] traits getOverloads + multiple interface inheritance only see one of the interfaces' overloads

2018-04-23 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17373

--- Comment #2 from github-bugzi...@puremagic.com ---
Commits pushed to master at https://github.com/dlang/dmd

https://github.com/dlang/dmd/commit/56e85cc59b594456bf56132ce2bcb73f559892a3
Fix Issue 17373 - traits getOverloads + multiple interface inheritance only see
one of the interfaces' overloads

https://github.com/dlang/dmd/commit/1848c70c977c1ee66dd1fdbd40c729fc5a18898d
Merge pull request #7959 from RazvanN7/Issue_17373

Fix Issue 17373 -  traits getOverloads + multiple interface inheritan…
merged-on-behalf-of: Mike Franklin 

--


[Issue 17373] traits getOverloads + multiple interface inheritance only see one of the interfaces' overloads

2018-04-23 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17373

github-bugzi...@puremagic.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--


[Issue 17373] traits getOverloads + multiple interface inheritance only see one of the interfaces' overloads

2018-02-26 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17373

RazvanN  changed:

   What|Removed |Added

 CC||razvan.nitu1...@gmail.com

--- Comment #1 from RazvanN  ---
PR : https://github.com/dlang/dmd/pull/7959

--


[Issue 17373] New: traits getOverloads + multiple interface inheritance only see one of the interfaces' overloads

2017-05-05 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17373

  Issue ID: 17373
   Summary: traits getOverloads + multiple interface inheritance
only see one of the interfaces' overloads
   Product: D
   Version: D2
  Hardware: All
OS: All
Status: NEW
  Severity: normal
  Priority: P1
 Component: dmd
  Assignee: nob...@puremagic.com
  Reporter: mathias.l...@sociomantic.com

Tested with 2.074 / master as of today:

```
interface Foo { void visit (int); }
interface Bar { void visit (double); }
interface FooBar : Foo, Bar {}

pragma(msg, __traits(getOverloads, FooBar, "visit").length);
```

Outputs `1LU`, which is incorrect as both will be part of the overload set.
This breaks reflection code which tries to auto-instantiate interfaces (like
Blackhole / whitehole).

--


[Issue 5344] Interface Inheritance Problem

2015-07-05 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=5344

Kenji Hara  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |INVALID

--- Comment #4 from Kenji Hara  ---
This is not a bug, it's normal name lookup behavior with inheritance. For
example:

class A {
void foo(int l) {}
}

class B : A {
void foo(string l, int k) {}
}

void main() {
B b = new B();
  //b.foo(0);   // NG, because B.foo hides A.foo
b.foo("x", 1);  // OK
}

There's two options:

1. Explicitly specify the base class/interface name on the foo call.

b.A.foo(1); // OK

2. Add an alias due to insert overload in the B.foo

  class B : A {
alias foo = A.foo;   // OK
void foo(string l, int k) {}
  }
  b.foo("x", 1); // ok
  b.foo(1);  // also OK

--


[Issue 1747] interface inheritance + casting ==> wrong method invoked

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

Andrei Alexandrescu  changed:

   What|Removed |Added

Version|D1 & D2 |D2

--


[Issue 1747] interface inheritance + casting ==> wrong method invoked

2014-02-12 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=1747


Andrej Mitrovic  changed:

   What|Removed |Added

 CC||andrej.mitrov...@gmail.com


--- Comment #5 from Andrej Mitrovic  2014-02-12 
06:22:55 PST ---
Simplified test-case:

-
interface IA
{
void mA();
}

interface IB : IA
{
void mB();
}

interface IC : IB
{
}

interface ID : IA, IC
{
void mD();
}

extern(C) int printf(in char* format, ...);

class C : ID
{
void mA() { assert(0, "mA called"); }
void mB() { printf("mB called\n");  }
void mD() { assert(0, "mD called"); }
}

void main()
{
C c = new C;
(cast(IC)c).mB();  // ok, mB called
(cast(IB)c).mB();  // fail, mA called
}
-

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


[Issue 10744] [regression git-head v2.064] Rejects valid interface inheritance + wrong error message

2013-08-06 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10744


Kenji Hara  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED


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


[Issue 10744] [regression git-head v2.064] Rejects valid interface inheritance + wrong error message

2013-08-06 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10744



--- Comment #3 from github-bugzi...@puremagic.com 2013-08-06 20:51:33 PDT ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/a291385c024e4477dd0d3b5eccb430ef058bb8bc
fix issue 10744 - Rejects valid interface inheritance + wrong error
message

https://github.com/D-Programming-Language/dmd/commit/0e2779a4cce616c3ede135fe8d4b06a7b91333f5
Merge pull request #2451 from hpohl/10744

[REG2.064a] fix issue 10744 - Rejects valid interface inheritance + wrong error
message

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


[Issue 10744] [regression git-head v2.064] Rejects valid interface inheritance + wrong error message

2013-08-06 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10744


Henning Pohl  changed:

   What|Removed |Added

 CC||henn...@still-hidden.de


--- Comment #2 from Henning Pohl  2013-08-06 07:33:56 
PDT ---
https://github.com/D-Programming-Language/dmd/pull/2451

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


[Issue 10744] [regression git-head v2.064] Rejects valid interface inheritance + wrong error message

2013-08-03 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10744


Andrej Mitrovic  changed:

   What|Removed |Added

 CC||andrej.mitrov...@gmail.com


--- Comment #1 from Andrej Mitrovic  2013-08-03 
08:12:26 PDT ---
Reduced test-case:

-
interface A
{
Foo foo();
int x();
}

class B : A
{
Bar foo() { return null; }
int x() { return 0; }
}

class Foo { }
class Bar : Foo { }

void main() { }
-

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


[Issue 10744] New: Rejects valid interface inheritance + wrong error message

2013-08-02 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10744

   Summary: Rejects valid interface inheritance + wrong error
message
   Product: D
   Version: D2
  Platform: All
OS/Version: All
Status: NEW
  Severity: regression
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: yazan.dab...@gmail.com


--- Comment #0 from yazan.dab...@gmail.com 2013-08-02 05:54:37 PDT ---
interface A {
  Foo foo();
  int x(); // must exist for the bug to appear
}

class B : A {
  override Bar foo() { // must return a child of the class returned by the
interface
return new Bar();
  }
  override int x() { return 0; } // must exist
}

class Foo {
  void foo() {}
}

class Bar : Foo {
  override void foo() {}
}

void main() {}

On DMD GIT HEAD commit 73e375a, the compiler errors with the following message:
main.d(6): Error: class main.B interface function 'int x()' is not implemented

The example compiles successfully on DMD v2.063.2

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


[Issue 1747] interface inheritance + casting ==> wrong method invoked

2011-06-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=1747


Brad Roberts  changed:

   What|Removed |Added

 CC||bra...@puremagic.com
  Component|Phobos  |DMD
Version|0.24|D1 & D2
 AssignedTo|ibuc...@ubuntu.com  |nob...@puremagic.com
Product|DGCC aka GDC|D
Summary|math.hypot and conv.toReal  |interface inheritance +
   |& toString unittests failed |casting ==> wrong method
   |on FreeBSD8 |invoked
   Severity|minor   |normal


--- Comment #4 from Brad Roberts  2011-06-04 00:13:48 PDT 
---
This is a general front end bug, not a gdc specific bug.  Recategorizing it.

Changing the attached code slightly shows that mA is what's being invoked
rather than the intended mB.

class ClassX : IntyD
{
void mA() { g |= 1; }
void mB() { g |= 2; }
void mD() { g |= 4; }
}

void main()
{
ClassX x = new ClassX;
assert(g == 0);
IntyB b = test(x);
assert(g == 0);
b.mB();

printf("g = %d\n", g);
assert(g == 2);
}

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


[Issue 5344] Interface Inheritance Problem

2010-12-19 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5344



--- Comment #3 from Andrej Mitrovic  2010-12-19 
10:28:32 PST ---
Yeah the only way this compiles is if you use the A type:
A b = new BCl();
b.a(1);

I don't see why using a B object wouldn't work. Bug, i guess..

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


[Issue 5344] Interface Inheritance Problem

2010-12-19 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5344



--- Comment #2 from Andrej Mitrovic  2010-12-19 
10:18:32 PST ---
Oh I see the problem now, B inherits from A, I missed that line.

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


[Issue 5344] Interface Inheritance Problem

2010-12-19 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5344


Andrej Mitrovic  changed:

   What|Removed |Added

 CC||andrej.mitrov...@gmail.com


--- Comment #1 from Andrej Mitrovic  2010-12-19 
10:17:49 PST ---
If I'm not mistaked:
B b = new BCl();

means the object b has a static type B, and the dynamic type BCl. Which means
you can only call methods defined by the B interface. This is probably
discussed more in TDPL, but I'd have to check it again because I'm not sure..

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


[Issue 5344] New: Interface Inheritance Problem

2010-12-12 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5344

   Summary: Interface Inheritance Problem
   Product: D
   Version: D2
  Platform: x86
OS/Version: Linux
Status: NEW
  Severity: major
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: mand...@brars.co.in


--- Comment #0 from Mandeep Singh Brar  2010-12-12 
09:32:28 PST ---
The following code does not compile.

import std.stdio;
interface A {
public void a(int l);
}
class ACl:A {
public void a(int l) {
writeln("Hello a");
}
}

interface B: public A {
public void a(string l, int k);
}

class BCl: ACl, B {
public void a(string l, int k) {
writeln("Hello B.a", l, k);
}
}


int main() {
B b = new BCl();
b.a(1);
return 0;
}

However changing the second line of main() to (cast(A)b).a(1) makes it work.

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


Re: Interface inheritance

2010-12-12 Thread Simen kjaeraas

Mandeep Singh Brar  wrote:


The following code does not compile.

import std.stdio;
interface A {
public void a(int l);
}
class ACl:A {
public void a(int l) {
writeln("Hello a");
}
}

interface B: A {
public void a(string l, int k);
}

class BCl: ACl, B {
public void a(string l, int k) {
writeln("Hello B.a", l, k);
}
}

int main() {
B b = new BCl();
b.a(1);
return 0;
}

However casting B to A like (cast(A)b).a(1); makes it work.

Regards
Mandeep


http://d.puremagic.com/issues/enter_bug.cgi
Please file the bug here.

--
Simen


Interface inheritance

2010-12-12 Thread Mandeep Singh Brar
The following code does not compile.

import std.stdio;
interface A {
public void a(int l);
}
class ACl:A {
public void a(int l) {
writeln("Hello a");
}
}

interface B: A {
public void a(string l, int k);
}

class BCl: ACl, B {
public void a(string l, int k) {
writeln("Hello B.a", l, k);
}
}

int main() {
B b = new BCl();
b.a(1);
return 0;
}

However casting B to A like (cast(A)b).a(1); makes it work.

Regards
Mandeep


[Issue 2061] wrong vtable call with multiple interface inheritance

2009-05-15 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2061


Walter Bright  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED




--- Comment #6 from Walter Bright   2009-05-15 
12:14:26 PDT ---
Fixed dmd 1.045 and 2.030

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


[Issue 2061] wrong vtable call with multiple interface inheritance

2009-05-15 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2061





--- Comment #5 from Steven Schveighoffer   2009-05-15 
06:56:20 PDT ---
Which compiler version is your patch against?  According to the changelog,
1.045 fixed this issue.  I haven't had time to test it yet, you may want to
compare your patch against that fix.

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


[Issue 2061] wrong vtable call with multiple interface inheritance

2009-05-14 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2061





--- Comment #4 from Shin Fujishiro   2009-05-14 21:10:49 PDT 
---
Created an attachment (id=367)
 --> (http://d.puremagic.com/issues/attachment.cgi?id=367)
This patch should fix the issue.

There is a typo in class.c. The compiler generates wrong vtable due to the
typo.

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


[Issue 2061] wrong vtable call with multiple interface inheritance

2009-05-14 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2061


Shin Fujishiro  changed:

   What|Removed |Added

 CC||rayerd@gmail.com




--- Comment #3 from Shin Fujishiro   2009-05-14 20:50:40 PDT 
---
*** Issue 2758 has been marked as a duplicate of this issue. ***

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


[Issue 2061] wrong vtable call with multiple interface inheritance

2008-12-09 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2061


[EMAIL PROTECTED] changed:

   What|Removed |Added

   Severity|critical|blocker




--- Comment #2 from [EMAIL PROTECTED]  2008-12-09 11:43 ---
Bumped into this again, with a simpler inheritance tree.

extern(C) int printf(char*,...);

interface A
{
char a();
}

interface B
{
char b();
}

interface C : A, B
{
char c();
}

interface D
{
char d();
}

interface E : C, D
{
char e();
}

class Foo : E
{
char a() { return('a'); }
char b() { return('b'); }
char c() { return('c'); }
char d() { return('d'); }
char e() { return('e'); }
}

void main() {
auto foo = new Foo;
E e = foo; D d = foo; C c = foo; B b = foo; A a = foo;
printf("Foo: %c %c %c %c %c\n", foo.a, foo.b, foo.c, foo.d, foo.e);
printf("A: %c\n", a.a);
printf("B: %c\n", b.b);
printf("C: %c %c %c\n", c.a, c.b, c.c);
printf("D: %c\n", d.d);
printf("E: %c %c %c %c %c\n", e.a, e.b, e.c, e.d, e.e);
}

outputs:

Foo: a b c d e
A: a
B: b
C: a b c
D: d
E: a a c d e

Note the incorrect E line.

If I swap around E's base interfaces, so E now becomes:

interface E : D, C
{
char e();
}

Now the E line is still wrong:

Foo: a b c d e
A: a
B: b
C: a b c
D: d
E: d b c d e

Marking as a blocker.  I don't know how to work around this.


-- 



[Issue 2061] wrong vtable call with multiple interface inheritance

2008-11-24 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2061


[EMAIL PROTECTED] changed:

   What|Removed |Added

Version|1.029   |1.036




--- Comment #1 from [EMAIL PROTECTED]  2008-11-24 08:46 ---
sheesh, I think I have messed up the example.

Please replace the definition for class E, and the main function with this:

class E(K, V) : D!(K, V)
{
int foo() {printf("foo\n"); return 0;}
int foo(int x) {printf("foo(int)\n"); return 0;}
int bar() {printf("bar\n"); return 0;}
}

void main() {
D!(uint, uint) d = new E!(uint, uint);
d.foo();
d.foo(0);
d.bar();
}


--