-
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.
Merge branch 'topic/1354' into 'master'
Fix p_body_part_for_decl for when body part is in separate unit Closes #1354 See merge request eng/libadalang/libadalang!1610
- Loading branch information
Showing
5 changed files
with
46 additions
and
16 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
13 changes: 13 additions & 0 deletions
13
testsuite/tests/properties/body_part_for_decl_separate/a.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,13 @@ | ||
procedure A is | ||
package P is | ||
procedure Bar; | ||
--% node.p_body_part_for_decl() | ||
private | ||
procedure Foo; | ||
--% node.p_body_part_for_decl() | ||
end P; | ||
|
||
package body P is separate; | ||
begin | ||
null; | ||
end A; |
5 changes: 5 additions & 0 deletions
5
testsuite/tests/properties/body_part_for_decl_separate/a~p.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,5 @@ | ||
separate(A) | ||
package body P is | ||
procedure Bar is null; | ||
procedure Foo is null; | ||
end P; |
11 changes: 11 additions & 0 deletions
11
testsuite/tests/properties/body_part_for_decl_separate/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,11 @@ | ||
Working on node <SubpDecl ["Bar"] a.adb:3:7-3:21> | ||
================================================= | ||
|
||
Eval 'node.p_body_part_for_decl()' | ||
Result: <NullSubpDecl ["Bar"] a~p.adb:3:4-3:26> | ||
|
||
Working on node <SubpDecl ["Foo"] a.adb:6:7-6:21> | ||
================================================= | ||
|
||
Eval 'node.p_body_part_for_decl()' | ||
Result: <NullSubpDecl ["Foo"] a~p.adb:4:4-4:26> |
2 changes: 2 additions & 0 deletions
2
testsuite/tests/properties/body_part_for_decl_separate/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: inline-playground | ||
input_sources: [a.adb] |