with Ada.Text_IO; use Ada.Text_IO; procedure Hello is package Example is type An_Interface is synchronized interface; procedure P1 (Self : in out An_Interface) is abstract; package Instantiation is type Instance is synchronized new An_Interface with private; overriding procedure P1 (Self : in out Instance); private protected type Instance is new An_Interface with procedure Actual_P1; private end Instance; end Instantiation; end Example; package body Example is package body Instantiation is protected body Instance is procedure Actual_P1 is begin Put_Line("Did Something"); end Actual_P1; end Instance; procedure P1 (Self : in out Instance) is begin Self.Actual_P1; end P1; end Instantiation; end Example; V : Example.Instantiation.Instance; begin Put_Line("Hello, world!"); -- dispatching ... Example.An_Interface'Class (V).P1; -- not dispatching V.P1; end Hello;