www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Order of interfaces

reply Tomas <skrivantomas seznam.cz> writes:
Does it matter in which order a class inherits from interfaces?

    class A : Interface1, Interface2{ ... }

    vs

    class A : Interface2, Interface1{ ... }

Conceptually it should not matter, but I'm getting really weird 
segfault errors with one version and no errors with the other 
version.

I still do not know what I'm doing wrong, but does anyone have an 
idea why the order might matter?
Jun 21 2019
parent reply user1234 <user1234 12.de> writes:
On Friday, 21 June 2019 at 20:42:00 UTC, Tomas wrote:
 Does it matter in which order a class inherits from interfaces?

    class A : Interface1, Interface2{ ... }

    vs

    class A : Interface2, Interface1{ ... }

 Conceptually it should not matter, but I'm getting really weird 
 segfault errors with one version and no errors with the other 
 version.
compiler segfault or segfault when the program runs ?
 I still do not know what I'm doing wrong, but does anyone have 
 an idea why the order might matter?
Jun 21 2019
parent Tomas <skrivantomas seznam.cz> writes:
On Friday, 21 June 2019 at 20:50:02 UTC, user1234 wrote:
 On Friday, 21 June 2019 at 20:42:00 UTC, Tomas wrote:
 Does it matter in which order a class inherits from interfaces?

    class A : Interface1, Interface2{ ... }

    vs

    class A : Interface2, Interface1{ ... }

 Conceptually it should not matter, but I'm getting really 
 weird segfault errors with one version and no errors with the 
 other version.
compiler segfault or segfault when the program runs ?
 I still do not know what I'm doing wrong, but does anyone have 
 an idea why the order might matter?
I'm getting segfault when running the program.
Jun 21 2019