Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(106)

Unified Diff: tests/language_strong/recursive_inheritance_test.dart

Issue 2456803004: fixes #27586, prefer context type in generic inference (Closed)
Patch Set: fix Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/language_strong/recursive_generic_test.dart ('k') | tests/lib_strong/html/documentfragment_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language_strong/recursive_inheritance_test.dart
diff --git a/tests/language_strong/recursive_inheritance_test.dart b/tests/language_strong/recursive_inheritance_test.dart
index 1d513ae5a3a156ddd297c4fd5d55813e95a0a1e0..0f5f05362e3761e185af94f18fea35fc41ef6490 100644
--- a/tests/language_strong/recursive_inheritance_test.dart
+++ b/tests/language_strong/recursive_inheritance_test.dart
@@ -6,16 +6,21 @@ import "package:expect/expect.dart";
// Regression test for recursive inheritance patterns
abstract class Comparable<T> {
- int compare(T a);
-}
-class MI<T extends MI<T>> {
+ int compareTo(T a);
}
+class MI<T extends MI<T>> {}
+
+class _MI extends MI<_MI> {}
class PMI<T extends Comparable<T>> extends MI<PMI<T>> {}
+class _PMI extends PMI<_PMI> implements Comparable<_PMI> {
+ int compareTo(_PMI other) => throw new UnimplementedError();
+}
+
void main() {
- var a = new MI();
- var b = new PMI();
+ MI a = new MI<_MI>();
+ PMI b = new PMI<_PMI>();
a = b;
Expect.isTrue(a is MI);
Expect.isTrue(b is PMI);
« no previous file with comments | « tests/language_strong/recursive_generic_test.dart ('k') | tests/lib_strong/html/documentfragment_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698