-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
nameres: add an option to traverse generic instantiations
The new option is `--traverse-generics`. It can be sets in test.yaml using the field `traverse_generics` sets to `true`, as shown in the added test generic_subp_named_param_2 (which is a simple copy of generic_subp_named_param using the name-resolution driver).
- Loading branch information
Showing
13 changed files
with
572 additions
and
5 deletions.
There are no files selected for viewing
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
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
19 changes: 19 additions & 0 deletions
19
testsuite/tests/name_resolution/generic_subp_named_param_2/test.adb
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
procedure Test is | ||
generic | ||
with procedure Foo (X : Integer := 42); | ||
procedure Gen; | ||
|
||
procedure Gen is | ||
begin | ||
Foo (42); | ||
Foo (X => 42); | ||
Foo; | ||
end Gen; | ||
|
||
procedure Bar (Y : Integer) is null; | ||
|
||
procedure My_Gen is new Gen (Bar); | ||
pragma Test_Statement; | ||
begin | ||
null; | ||
end Test; |
Oops, something went wrong.