Index: pkg/analyzer/test/src/task/strong/checker_test.dart |
diff --git a/pkg/analyzer/test/src/task/strong/checker_test.dart b/pkg/analyzer/test/src/task/strong/checker_test.dart |
index 9013f2121b5871f8a4c578d7762c3a64a3b1ea90..f5eda5c342327a03d4ed20693ed6f799174dcf6f 100644 |
--- a/pkg/analyzer/test/src/task/strong/checker_test.dart |
+++ b/pkg/analyzer/test/src/task/strong/checker_test.dart |
@@ -3699,7 +3699,9 @@ g() { |
} |
void test_typePromotionFromTypeParameter() { |
- // Regression test for https://github.com/dart-lang/sdk/issues/26965 |
+ // Regression test for: |
+ // https://github.com/dart-lang/sdk/issues/26965 |
+ // https://github.com/dart-lang/sdk/issues/27040 |
checkFile(r''' |
void f/*<T>*/(/*=T*/ object) { |
if (object is String) print(object.substring(1)); |
@@ -3714,8 +3716,7 @@ class SubClonable<T> extends Clonable<T> { |
} |
void h/*<T extends Clonable<T>>*/(/*=T*/ object) { |
Leaf
2016/09/30 05:00:04
Test that object is usable as a SubClonable<T> as
Jennifer Messerly
2016/09/30 16:58:03
I think `object.m` is supposed to illustrate that.
Leaf
2016/09/30 17:00:30
Sort of. object.m tests that SubClonable methods
|
if (/*info:NON_GROUND_TYPE_CHECK_INFO*/object is SubClonable/*<T>*/) { |
- // Note we need to cast back to T, because promotion lost that type info. |
- print(object.m(object as dynamic/*=T*/)); |
+ print(object.m(object)); |
} |
} |
'''); |