-
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.
Make get_primitives working on task types
- Loading branch information
Showing
8 changed files
with
127 additions
and
12 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
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 |