UndefinedCallError if the current method does not override any other overrides.
AmbiguousCallError if more than one 'next' overrides exist but none of
them is more specific than all the others.
void inspect(virtual!Vehicle, virtual!Inspector); @method void _inspect(Vehicle v, Inspector i) { writeln("Inspect vehicle."); } @method void _inspect(Car v, Inspector i) { next!inspect(v, i); writeln("Inspect seat belts."); } @method void _inspect(Car v, StateInspector i) { next!inspect(v, i); writeln("Check insurance."); } ... Vehicle car = new Car; Inspector inspector = new StateInspector; inspect(car, inspector); // Inspect vehicle. Inspect seat belts. Check insurance.
Call the next most specialized override if it exists. In other words, call the override that would have been called if this one had not been defined.