-
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.
U409-026: Fix previous_part for protected bodies.
- Loading branch information
Showing
6 changed files
with
41 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
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,15 @@ | ||
package body Prot is | ||
protected body P is | ||
entry E (I : in out Integer) when Flag is | ||
begin | ||
I := Var + I; | ||
Var := I; -- FLAG | ||
end E; | ||
|
||
procedure P (I : Integer) is | ||
begin | ||
Flag := I > 0; | ||
end P; | ||
end P; | ||
--% node.p_decl_part() | ||
end Prot; |
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 @@ | ||
package Prot is | ||
Var : Integer; | ||
|
||
protected P is | ||
entry E (I : in out Integer); | ||
procedure P (I : Integer); | ||
private | ||
Flag : Boolean; | ||
end P; | ||
|
||
end Prot; |
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,5 @@ | ||
Eval 'node.p_decl_part()' on node <ProtectedBody ["P"] prot.adb:2:4-13:10> | ||
Result: <SingleProtectedDecl ["P"] prot.ads:4:4-9:10> | ||
|
||
|
||
|
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: inline-playground | ||
input_sources: [prot.adb, prot.ads] |
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,6 @@ | ||
type: bugfix | ||
title: Fix navigation of protected bodies | ||
description: | | ||
This change fixes a bug where calling ``P_Decl_Part`` on a protected body | ||
which corresponding declaration was a SingleProtectedDecl would fail. | ||
date: 2021-04-09 |