-
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/1083' into 'master'
Support get_primitives on TaskTypeDecl Closes #1083 See merge request eng/libadalang/libadalang!1446
- Loading branch information
Showing
8 changed files
with
379 additions
and
264 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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,29 @@ | ||
procedure Ptask is | ||
package Pkg is | ||
task type Parent is | ||
entry E (I : in out Integer); | ||
end Parent; | ||
|
||
function Id (X : Parent) return Integer; | ||
end Pkg; | ||
|
||
use Pkg; | ||
|
||
type T is new Parent; | ||
|
||
X : T; | ||
|
||
package body Pkg is | ||
task body Parent is | ||
begin | ||
null; | ||
end Parent; | ||
|
||
function Id (X : Parent) return Integer is (4); | ||
end pkg; | ||
|
||
I : Integer := 8; | ||
begin | ||
I := Id (X); | ||
pragma Test_Statement; | ||
end Ptask; |
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 ptask.adb | ||
################### | ||
|
||
Resolving xrefs for node <AssignStmt ptask.adb:27:4-27:16> | ||
********************************************************** | ||
|
||
Expr: <Id "I" ptask.adb:27:4-27:5> | ||
references: <DefiningName "I" ptask.adb:25:4-25:5> | ||
type: <ConcreteTypeDecl ["Integer"] __standard:4:3-4:54> | ||
expected type: None | ||
Expr: <CallExpr ptask.adb:27:9-27:15> | ||
references: <DefiningName "Id" ptask.adb:7:16-7:18> | ||
type: <ConcreteTypeDecl ["Integer"] __standard:4:3-4:54> | ||
expected type: <ConcreteTypeDecl ["Integer"] __standard:4:3-4:54> | ||
Expr: <Id "Id" ptask.adb:27:9-27:11> | ||
references: <DefiningName "Id" ptask.adb:7:16-7:18> | ||
type: <ConcreteTypeDecl ["Integer"] __standard:4:3-4:54> | ||
expected type: None | ||
Expr: <Id "X" ptask.adb:27:13-27:14> | ||
references: <DefiningName "X" ptask.adb:14:4-14:5> | ||
type: <ConcreteTypeDecl ["T"] ptask.adb:12:4-12:25> | ||
expected type: <ConcreteTypeDecl ["T"] ptask.adb:12:4-12:25> | ||
|
||
|
||
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: [ptask.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,29 @@ | ||
procedure Ptask is | ||
package Pkg is | ||
task type Parent is | ||
entry E (I : in out Integer); | ||
end Parent; | ||
--% node.p_get_primitives() | ||
|
||
function Id (X : Parent) return Integer; | ||
end Pkg; | ||
|
||
use Pkg; | ||
|
||
type T is new Parent; | ||
--% node.p_get_primitives() | ||
|
||
X : T; | ||
|
||
package body Pkg is | ||
task body Parent is | ||
begin | ||
null; | ||
end Parent; | ||
|
||
function Id (X : Parent) return Integer is (4); | ||
end pkg; | ||
|
||
begin | ||
null; | ||
end Ptask; |
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
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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
driver: inline-playground | ||
input_sources: [test.adb] | ||
input_sources: [test.adb, ptask.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,8 @@ | ||
type: api-change | ||
title: Move P_Get_Primitives from Type_Decl to Base_Type_Decl | ||
short_title: Move P_Get_Primitives in Base_Type_Decl | ||
description: | | ||
This change moves the `P_Get_Primitives` from the `Ada_Type_Decl` type to | ||
the `Ada_Base_Type_Decl` type. This allows to call `P_Get_Primitives` on | ||
the `Ada_Task_Type_Decl` type for example. | ||
date: 2023-10-26 |