-
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/1035' into 'master'
Support prefixed-view notation for calls to primitive subprograms of untagged types Closes #1035 See merge request eng/libadalang/libadalang!1464
- Loading branch information
Showing
4 changed files
with
87 additions
and
18 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
34 changes: 34 additions & 0 deletions
34
testsuite/tests/name_resolution/prefixed_untagged/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,34 @@ | ||
procedure Test is | ||
package Pkg is | ||
type T is null record; | ||
procedure P (B : T); | ||
end Pkg; | ||
|
||
package body Pkg is | ||
procedure P (B : T) is null; | ||
|
||
procedure Q (B : T) is | ||
begin | ||
B.P; | ||
pragma Test_Statement; | ||
end Q; | ||
end Pkg; | ||
|
||
package Pkg2 is | ||
type T is null record; | ||
subtype U is T; | ||
procedure P (B : U); | ||
end Pkg2; | ||
|
||
package body Pkg2 is | ||
procedure P (B : U) is null; | ||
|
||
procedure Q (B : U) is | ||
begin | ||
B.P; | ||
pragma Test_Statement; | ||
end Q; | ||
end Pkg2; | ||
begin | ||
null; | ||
end Test; |
37 changes: 37 additions & 0 deletions
37
testsuite/tests/name_resolution/prefixed_untagged/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,37 @@ | ||
Analyzing test.adb | ||
################## | ||
|
||
Resolving xrefs for node <CallStmt test.adb:12:10-12:14> | ||
******************************************************** | ||
|
||
Expr: <DottedName test.adb:12:10-12:13> | ||
references: <DefiningName "P" test.adb:4:17-4:18> | ||
type: None | ||
expected type: None | ||
Expr: <Id "B" test.adb:12:10-12:11> | ||
references: <DefiningName "B" test.adb:10:20-10:21> | ||
type: <ConcreteTypeDecl ["T"] test.adb:3:7-3:29> | ||
expected type: <ConcreteTypeDecl ["T"] test.adb:3:7-3:29> | ||
Expr: <Id "P" test.adb:12:12-12:13> | ||
references: <DefiningName "P" test.adb:4:17-4:18> | ||
type: None | ||
expected type: None | ||
|
||
Resolving xrefs for node <CallStmt test.adb:28:10-28:14> | ||
******************************************************** | ||
|
||
Expr: <DottedName test.adb:28:10-28:13> | ||
references: <DefiningName "P" test.adb:20:17-20:18> | ||
type: None | ||
expected type: None | ||
Expr: <Id "B" test.adb:28:10-28:11> | ||
references: <DefiningName "B" test.adb:26:20-26:21> | ||
type: <SubtypeDecl ["U"] test.adb:19:7-19:22> | ||
expected type: <SubtypeDecl ["U"] test.adb:19:7-19:22> | ||
Expr: <Id "P" test.adb:28:12-28:13> | ||
references: <DefiningName "P" test.adb:20:17-20:18> | ||
type: None | ||
expected type: None | ||
|
||
|
||
Done. |
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] |