-
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.
TC15-033: Fix p_is_call on qualified subp names.
- Loading branch information
Showing
5 changed files
with
53 additions
and
9 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
15 changes: 15 additions & 0 deletions
15
testsuite/tests/properties/is_call_enclosing_subp/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,15 @@ | ||
procedure Test is | ||
function Temp (x,y: Integer) return Boolean is Null; | ||
|
||
procedure Outer_Procedure (x: Integer) is | ||
function Inner_Procedure (x: Integer) return Boolean is | ||
begin | ||
return Temp (Outer_Procedure.x, x); | ||
--% node.f_return_expr.f_suffix[0].f_r_expr.f_prefix.p_is_call | ||
end Inner_Procedure; | ||
begin | ||
Null; | ||
end Outer_Procedure; | ||
begin | ||
null; | ||
end Test; |
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,4 @@ | ||
Eval 'node.f_return_expr.f_suffix[0].f_r_expr.f_prefix.p_is_call' on node <ReturnStmt test.adb:7:12-7:47> | ||
Result: False | ||
|
||
|
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: [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,14 @@ | ||
type: bugfix | ||
title: Fix ``p_is_call`` on qualified subprogram name | ||
description: | | ||
This change fixes a bug where a qualified subprogram name could be wrongly | ||
tagged as a call, as in the following example: | ||
.. code:: ada | ||
function Foo (X : Integer) return Integer is | ||
begin | ||
return Foo.X; -- `Foo` was wrongly considered a call | ||
end Foo; | ||
date: 2021-03-08 |