-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'topic/1111' into 'master'
Filter out bodies when resolving generic renaming declarations Closes #1111 See merge request eng/libadalang/libadalang!1435
- Loading branch information
Showing
6 changed files
with
38 additions
and
0 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
10 changes: 10 additions & 0 deletions
10
testsuite/tests/name_resolution/generic_renaming_decl_3/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,10 @@ | ||
with Test_2; | ||
|
||
procedure Test is | ||
generic function Gen renames Test_2; | ||
|
||
function Equals is new Gen (Integer); | ||
pragma Test_Statement; | ||
begin | ||
null; | ||
end Test; |
17 changes: 17 additions & 0 deletions
17
testsuite/tests/name_resolution/generic_renaming_decl_3/test.out
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,17 @@ | ||
Analyzing test.adb | ||
################## | ||
|
||
Resolving xrefs for node <GenericSubpInstantiation ["Equals"] test.adb:6:4-6:41> | ||
******************************************************************************** | ||
|
||
Expr: <Id "Gen" test.adb:6:27-6:30> | ||
references: <DefiningName "Test_2" test_2.ads:3:10-3:16> | ||
type: None | ||
expected type: None | ||
Expr: <Id "Integer" test.adb:6:32-6:39> | ||
references: <DefiningName "Integer" __standard:4:8-4:15> | ||
type: None | ||
expected type: None | ||
|
||
|
||
Done. |
2 changes: 2 additions & 0 deletions
2
testsuite/tests/name_resolution/generic_renaming_decl_3/test.yaml
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,2 @@ | ||
driver: name-resolution | ||
input_sources: [test.adb] |
4 changes: 4 additions & 0 deletions
4
testsuite/tests/name_resolution/generic_renaming_decl_3/test_2.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,4 @@ | ||
function Test_2 (L, R : Operand_Type) return Boolean is | ||
begin | ||
return L = R; | ||
end Test_2; |
3 changes: 3 additions & 0 deletions
3
testsuite/tests/name_resolution/generic_renaming_decl_3/test_2.ads
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,3 @@ | ||
generic | ||
type Operand_Type is private; | ||
function Test_2 (L, R : Operand_Type) return Boolean; |