classdef (InferiorClasses = {?A}) D < A
  methods
    function f = D(val)
      f = f@A(val);
    end
    function h = plus(f, g)
      disp('called D::plus')
      h = f.foo + 1000*g.foo;
    end
  end
end
