-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[VM/runtime] Allow generic function types as type arguments in the VM.
Type parameter scopes were not set properly when loading bounds with generic function types from kernel file. The trail to avoid infinite recursion while comparing type parameter bounds was not used properly. Fixes #45313 Fixes #45322 Fixes #44930 TEST=regression tests added Change-Id: I096b7d8c22aa5b3a3a9e12a59b1417388ff5171f Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/191465 Commit-Queue: Régis Crelier <[email protected]> Reviewed-by: Siva Annamalai <[email protected]> Reviewed-by: Alexander Markov <[email protected]>
- Loading branch information
1 parent
1a7d39b
commit 33cabf4
Showing
5 changed files
with
74 additions
and
16 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
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
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,17 @@ | ||
// Copyright (c) 2021, the Dart project authors. Please see the AUTHORS file | ||
// for details. All rights reserved. Use of this source code is governed by a | ||
// BSD-style license that can be found in the LICENSE file. | ||
|
||
// SharedOptions=--enable-experiment=generic-metadata | ||
|
||
import "package:expect/expect.dart"; | ||
|
||
typedef TEST_TYPEDEF<TT extends T Function<T>(T)> = void | ||
Function<TTT extends TT>(); | ||
void testme<TT extends T Function<T>(T)>() {} | ||
|
||
main() { | ||
Expect.isTrue(testme is TEST_TYPEDEF); | ||
TEST_TYPEDEF ttttt = testme; | ||
Expect.isTrue(ttttt is TEST_TYPEDEF); | ||
} |