Created
May 25, 2021 23:54
-
-
Save JeremyGrosser/622a591867ffffe5f3c16a5cc874723c to your computer and use it in GitHub Desktop.
Nested generic procedures in Ada
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 Main is | |
generic | |
type A_Type is private; | |
procedure Outer (A : A_Type); | |
procedure Outer (A : A_Type) is | |
generic | |
type B_Type is private; | |
procedure Inner (A : A_Type; B : B_Type); | |
procedure Inner (A : A_Type; B : B_Type) is | |
begin | |
null; | |
end Inner; | |
procedure Integer_Inner is new Inner (Integer); | |
begin | |
Integer_Inner (A, 2); | |
end Outer; | |
procedure Integer_Outer is new Outer (Integer); | |
begin | |
Integer_Outer (1); | |
end Main; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment