Created
June 18, 2018 14:10
-
-
Save raph-amiard/0f9439181c2da555db5e372e77ff371b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
procedure Teststpr is | |
type Kind is (A, B, C, D); | |
Lol : constant := 12; | |
subtype Subkind is Kind | |
with Static_Predicate => Subkind = A or else (Lol > 20 and then Subkind = D); | |
-- WHAT THE ACTUAL FUCK | |
type Rec (K : Kind) is record | |
case K is | |
when Subkind => O : Integer; | |
when others => null; | |
end case; | |
end record; | |
R : Rec := (K => D, O => 12); | |
-- Invalid because O is not a component of Rec | |
begin | |
null; | |
end Teststpr; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment