From 155f6c5d4dc3e6884ac98af683bcb18f7c189521 Mon Sep 17 00:00:00 2001 From: Maxime Perrotin Date: Mon, 3 Apr 2017 15:33:49 +0200 Subject: [PATCH] Remove direct access to value of option type --- ada/option_type.ads | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ada/option_type.ads b/ada/option_type.ads index c2a4c3b..5e04b06 100644 --- a/ada/option_type.ads +++ b/ada/option_type.ads @@ -8,8 +8,8 @@ package Option_Type is type Option is tagged private; function Just (I : T) return Option; function Nothing return Option; - function Just (O : Option) return T; - function Value (O : Option) return T renames Just; + -- function Just (O : Option) return T; + -- function Value (O : Option) return T renames Just; function Value_Or (O : Option; Default : T) return T; function Has_Value (O : Option) return Boolean; @@ -27,7 +27,7 @@ private function Nothing return Option is (Present => False, others => <>); - function Just (O : Option) return T is (O.Value); + -- function Just (O : Option) return T is (O.Value); function Value_Or (O : Option; Default : T) return T is (if O.Present then O.Value else Default); -- GitLab