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

Unified Diff: tests/language/type_promotion_more_specific_test.dart

Issue 47513007: Fix the more specific relation. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebase + fix test/status Created 7 years, 2 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/type_promotion_functions_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/type_promotion_more_specific_test.dart
diff --git a/tests/language/type_promotion_more_specific_test.dart b/tests/language/type_promotion_more_specific_test.dart
index b672e4be5cefcf9a7e617e620ce0fa3b2885f14d..eb843b6f3a51ea2bdce77552a1b43d7f46dab81b 100644
--- a/tests/language/type_promotion_more_specific_test.dart
+++ b/tests/language/type_promotion_more_specific_test.dart
@@ -61,17 +61,17 @@ testGeneric() {
if (d1 is E) { // Promotion: E << D.
x = d1.e; /// 05: ok
}
- if (d1 is E<A>) { // No promotion E<A> << D.
- int a = d1.d; /// 06: ok
- String b = d1.d; /// 07: ok
- x = d1.e; /// 08: static type warning
+ if (d1 is E<A>) { // Promotion: E<A> << D.
+ int a = d1.d; /// 06: static type warning
+ String b = d1.d; /// 07: static type warning
+ x = d1.e; /// 08: ok
}
D<A> d2 = new E<B>(null);
- if (d2 is E) { // Promotion: E << D<A>
- x = d2.e; /// 09: ok
- int a = d2.e; /// 10: ok
- String b = d2.e; /// 11: ok
+ if (d2 is E) { // No promotion: E !<< D<A>
+ x = d2.e; /// 09: static type warning
+ int a = d2.e; /// 10: static type warning
+ String b = d2.e; /// 11: static type warning
}
D<A> d3 = new E<B>(new B());
« no previous file with comments | « tests/language/type_promotion_functions_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698