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

Unified Diff: tests/language/generic_methods_type_expression_test.dart

Issue 2388843002: Relaxes treatment of method type parameter in `as` expressions. (Closed)
Patch Set: Simplifies `o as T` check for `T` method type parameter. Created 4 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 | « pkg/compiler/lib/src/ssa/builder.dart ('k') | tests/language/language.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/generic_methods_type_expression_test.dart
diff --git a/tests/language/generic_methods_type_expression_test.dart b/tests/language/generic_methods_type_expression_test.dart
index dd98c7ad61d49189410d3ef1f439385e5560e269..fadd7e93365863339d733185193c62744a017b40 100644
--- a/tests/language/generic_methods_type_expression_test.dart
+++ b/tests/language/generic_methods_type_expression_test.dart
@@ -51,8 +51,8 @@ main() {
Expect.throws(() => f3<String>(42), (e) => e is TypeError);
Expect.equals(f4<int>(<int>[42]), false);
Expect.equals(f4<String>(<int>[42]), false); // `is! List<dynamic>` is false.
- Expect.throws(() => f5<String>(s), (e) => e is TypeError);
- Expect.throws(() => f5<int>(s), (e) => e is TypeError);
+ Expect.equals(f5<String>(s), s); // `s as dynamic == s`
+ Expect.equals(f5<int>(s), s); // `s as dynamic == s`
Expect.equals(f6<String>(ss), ss);
Expect.equals(f6<int>(ss), ss); // `as List<dynamic>` succeeds.
Expect.throws(() => f7<int>(), (e) => e is TypeError);
« no previous file with comments | « pkg/compiler/lib/src/ssa/builder.dart ('k') | tests/language/language.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698