-
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/1105' into 'master'
Fix access-to-object membership test Closes #1105 See merge request eng/libadalang/libadalang!1440
- Loading branch information
Showing
4 changed files
with
66 additions
and
2 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/name_resolution/membership_expr_4/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,13 @@ | ||
procedure Test is | ||
type T is (A, B, C, D); | ||
type U is new T; | ||
type U_Ptr is access U; | ||
|
||
function F (O : access T) return Boolean is | ||
begin | ||
return O in U_Ptr; | ||
pragma Test_Statement; | ||
end F; | ||
begin | ||
null; | ||
end Test; |
24 changes: 24 additions & 0 deletions
24
testsuite/tests/name_resolution/membership_expr_4/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,24 @@ | ||
Analyzing test.adb | ||
################## | ||
|
||
Resolving xrefs for node <ReturnStmt test.adb:8:7-8:25> | ||
******************************************************* | ||
|
||
Expr: <MembershipExpr test.adb:8:14-8:24> | ||
type: <ConcreteTypeDecl ["Boolean"] __standard:3:3-3:33> | ||
expected type: <ConcreteTypeDecl ["Boolean"] __standard:3:3-3:33> | ||
Expr: <Id "O" test.adb:8:14-8:15> | ||
references: <DefiningName "O" test.adb:6:16-6:17> | ||
type: <AnonymousTypeDecl ["None"] test.adb:6:20-6:28> | ||
expected type: <ConcreteTypeDecl ["U_Ptr"] test.adb:4:4-4:27> | ||
Expr: <OpIn "in" test.adb:8:16-8:18> | ||
references: None | ||
type: None | ||
expected type: None | ||
Expr: <Id "U_Ptr" test.adb:8:19-8:24> | ||
references: <DefiningName "U_Ptr" test.adb:4:9-4:14> | ||
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] |