This code doesn't work as I would expect. B()->x has only the type
function(int:int). Is the intention that overloading one of the
variants invalidates the others?

class A {
  int x(int i) { return i; }
  variant int x() { return x(3); }
}

class B {
  inherit A;
  int x(int i) { return i+1; }
}
  • variants Martin Nilsson (Opera Mini - AFK!) @ Pike (-) developers forum
    • varian... Mirar @ Pike developers forum
      • va... Martin Nilsson (Opera Mini - AFK!) @ Pike (-) developers forum
    • varian... Martin Nilsson (Opera Mini - AFK!) @ Pike (-) developers forum

Reply via email to