www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - Mixin Bug - super

reply J Anderson <REMOVEanderson badmama.com.au> writes:
template A(T)
{
    this() {  }
   
    this(int i)
    { 
        super.foo(); //This is the problem line
    }
}


class B
{
    void foo() {  }   
}

class C : B
{
    mixin A!(C);
}

void main()
{
    C c = new C;
}

-- 
-Anderson: http://badmama.com.au/~anderson/
May 22 2004
parent J C Calvarese <jcc7 cox.net> writes:
J Anderson wrote:
 template A(T)
 {
    this() {  }
      this(int i)
    {        super.foo(); //This is the problem line
    }
 }
 
 
 class B
 {
    void foo() {  }   }
 
 class C : B
 {
    mixin A!(C);
 }
 
 void main()
 {
    C c = new C;
 }
Yeah, that's a pretty abrupt message... Assertion failure: 'cd' on line 1117 in file 'expression.c' abnormal program termination -- Justin (a/k/a jcc7) http://jcc_7.tripod.com/d/
May 22 2004