Covariant problem

Zarathustra adam.chrapkowski at gmail.com
Thu Jul 24 06:23:44 PDT 2008


Sorry, for the amount of posts, but below is full and most easy example program which ilustrates problem ;)
________________________________________________________
// class CFoo
//_______________________________________________
class CFoo{
  //_____________________________________________
  //  ::>> Attributes <<::
  //

  //_____________________________________________
  //  << fields >>
  
  public real [] test(){ return [3.4, 4.5]; }
}

// class CBar
//_________________________________________________
class CBar : CFoo{
    //_____________________________________________
  //  ::>> Attributes <<::
  //

  //_____________________________________________
  //  << fields >>
  public uint [] test(){ return [9, 8, 7]; }
}

void
main(char [][] args){
}
________________________________________________________



More information about the Digitalmars-d-learn mailing list