-
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/1303' into 'master'
Add support for the Preelaborable_Initialization attribute Closes #1303 See merge request eng/libadalang/libadalang!1561
- Loading branch information
Showing
4 changed files
with
40 additions
and
1 deletion.
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
11 changes: 11 additions & 0 deletions
11
testsuite/tests/name_resolution/preelaborable_initialization/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,11 @@ | ||
-- Test for the Preelaborable aspect/attribute name resolution | ||
|
||
procedure Test is | ||
type T is new Integer; | ||
|
||
type U is new T with | ||
Preelaborable_Initializaton => T'Preelaborable_Initialization; | ||
pragma Test_Block; | ||
begin | ||
null; | ||
end Test; |
25 changes: 25 additions & 0 deletions
25
testsuite/tests/name_resolution/preelaborable_initialization/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,25 @@ | ||
Analyzing test.adb | ||
################## | ||
|
||
Resolving xrefs for node <AspectAssoc test.adb:7:7-7:68> | ||
******************************************************** | ||
|
||
Expr: <Id "Preelaborable_Initializaton" test.adb:7:7-7:34> | ||
references: None | ||
type: None | ||
expected type: None | ||
Expr: <AttributeRef test.adb:7:38-7:68> | ||
references: None | ||
type: <ConcreteTypeDecl ["Boolean"] __standard:3:3-3:33> | ||
expected type: None | ||
Expr: <Id "T" test.adb:7:38-7:39> | ||
references: <DefiningName "T" test.adb:4:9-4:10> | ||
type: <ConcreteTypeDecl ["T"] test.adb:4:4-4:26> | ||
expected type: None | ||
Expr: <Id "Preelaborable_Initialization" test.adb:7:40-7:68> | ||
references: None | ||
type: None | ||
expected type: None | ||
|
||
|
||
Done. |
2 changes: 2 additions & 0 deletions
2
testsuite/tests/name_resolution/preelaborable_initialization/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] |