-- Methods (varc-syntax LX20): an impl block's subprograms take the type as `self`.
package Shapes is
   type Shape is abstract tagged record
      id : Natural := 0;
   end record;
   function area (self : Shape) return Natural is abstract;
   function label (self : Shape) return String is ("shape");
   type Square is new Shape with record
      side : Natural range 0 .. 100 := 1;
   end record;
   function area (self : Square) return Natural is (self.side * self.side);
   procedure grow (self : in out Square) with Pre => self.side < 100, Post => self.side = self.side'Old + 1;
end;
