Created
May 25, 2021 23:47
-
-
Save JeremyGrosser/9ad1fc362274cbf26e1bf4e735215c41 to your computer and use it in GitHub Desktop.
Nested generic packages 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
package body Generic_Nested is | |
package body Inner_Nested is | |
procedure Test (A : A_Type; B : B_Type) is | |
begin | |
null; | |
end Test; | |
end Inner_Nested; | |
end Generic_Nested; |
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
generic | |
type A_Type is private; | |
package Generic_Nested is | |
generic | |
type B_Type is private; | |
package Inner_Nested is | |
procedure Test (A : A_Type; B : B_Type); | |
end Inner_Nested; | |
end Generic_Nested; |
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
with Generic_Nested; | |
procedure Main is | |
package GN is new Generic_Nested (Integer); | |
package Inner is new GN.Inner_Nested (Integer); | |
begin | |
Inner.Test (1, 2); | |
end Main; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment