blob: 09b8db54c56586033fbeadfa78fc1a0bb116bb28 [file] [log] [blame]
-- { dg-do compile }
-- { dg-options "-O2 -gnata -gnatVa" }
with Opt5_Pkg;
package Opt5 is
type Object is new Opt5_Pkg.Object with private;
Undefined : constant Object;
overriding function Is_Defined (Self : Object) return Boolean;
function Create (Sloc : Opt5_Pkg.Object) return Integer is (0)
with Pre => Sloc.Is_Defined;
private
type Object is new Opt5_Pkg.Object with null record;
Undefined : constant Object := (Opt5_Pkg.Undefined with others => <>);
overriding function Is_Defined (Self : Object) return Boolean is (Self /= Undefined);
end Opt5;