-
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.
Do not memoize Name.name_designated_type_env
- Loading branch information
Showing
4 changed files
with
72 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
21 changes: 21 additions & 0 deletions
21
testsuite/tests/name_resolution/use_clause_in_instantiation/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,21 @@ | ||
procedure Test is | ||
generic package GP is | ||
generic function GF return Boolean; | ||
private | ||
-- The following use clause was known to raise an infinite recursion in | ||
-- Name.name_designated_type_env because of an unsoundness issue between | ||
-- infinite recursion guards in lexical envs and memoized properties. | ||
|
||
use type Integer; | ||
end GP; | ||
|
||
package body GP is | ||
function GF return Boolean is (True); | ||
end GP; | ||
|
||
package P is new GP; | ||
function F is new P.GF; | ||
pragma Test_Statement; | ||
begin | ||
null; | ||
end Test; |
43 changes: 43 additions & 0 deletions
43
testsuite/tests/name_resolution/use_clause_in_instantiation/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,43 @@ | ||
Analyzing test.adb | ||
################## | ||
|
||
Resolving xrefs for node <GenericSubpInstantiation ["F"] test.adb:17:4-17:27> | ||
***************************************************************************** | ||
|
||
Expr: <DottedName test.adb:17:22-17:26> | ||
references: <| DefiningName "GF" test.adb:3:24-3:26 [test.adb:16:4] |> | ||
type: None | ||
expected type: None | ||
Expr: <Id "P" test.adb:17:22-17:23> | ||
references: <DefiningName "P" test.adb:16:12-16:13> | ||
type: None | ||
expected type: None | ||
Expr: <Id "GF" test.adb:17:24-17:26> | ||
references: <| DefiningName "GF" test.adb:3:24-3:26 [test.adb:16:4] |> | ||
type: None | ||
expected type: None | ||
Traversing generic node <| GenericSubpDecl ["GF"] test.adb:3:7-3:42 [test.adb:16:4, test.adb:17:4] |> | ||
***************************************************************************************************** | ||
|
||
Resolving xrefs for node <| SubpSpec test.adb:3:15-3:41 [test.adb:16:4, test.adb:17:4] |> | ||
***************************************************************************************** | ||
|
||
Expr: <| Id "Boolean" test.adb:3:34-3:41 [test.adb:16:4, test.adb:17:4] |> | ||
references: <DefiningName "Boolean" __standard:3:8-3:15> | ||
type: None | ||
expected type: None | ||
|
||
Traversing generic node <| ExprFunction ["GF"] test.adb:13:7-13:44 [test.adb:16:4, test.adb:17:4] |> | ||
**************************************************************************************************** | ||
|
||
Resolving xrefs for node <| SubpSpec test.adb:13:7-13:33 [test.adb:16:4, test.adb:17:4] |> | ||
****************************************************************************************** | ||
|
||
Expr: <| Id "Boolean" test.adb:13:26-13:33 [test.adb:16:4, test.adb:17:4] |> | ||
references: <DefiningName "Boolean" __standard:3:8-3:15> | ||
type: None | ||
expected type: None | ||
|
||
|
||
|
||
Done. |
3 changes: 3 additions & 0 deletions
3
testsuite/tests/name_resolution/use_clause_in_instantiation/test.yaml
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,3 @@ | ||
driver: name-resolution | ||
input_sources: [test.adb] | ||
traverse_generics: true |