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

Unified Diff: tests/language/type_variable_scope2_test.dart

Issue 19097003: Support new malformed types semantics. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 5 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
Index: tests/language/type_variable_scope2_test.dart
diff --git a/tests/language/type_variable_scope2_test.dart b/tests/language/type_variable_scope2_test.dart
index 569daee6b7329c2761275563a1d2b684d8fd8d65..49f5c795fb209d4eaedbf46435916fc5eedf4ba5 100644
--- a/tests/language/type_variable_scope2_test.dart
+++ b/tests/language/type_variable_scope2_test.dart
@@ -4,17 +4,8 @@
import "package:expect/expect.dart";
-// Test that malformed type arguments are reported in checked mode.
-
-isCheckedMode() {
- try {
- var i = 1;
- String s = i;
- return false;
- } catch (e) {
- return true;
- }
-}
+// Test that malformed type arguments treated as dynamic in both production and
+// checked mode.
class Foo<T> {
// T is not in scope for a static method.
@@ -31,6 +22,6 @@ main() {
print(error);
got_type_error = true;
}
- // Type error in checked mode only.
- Expect.isTrue(got_type_error == isCheckedMode());
+ // No type error in production nor checked mode.
karlklose 2013/07/19 11:45:40 You could fail in the catch-block.
Johnni Winther 2013/07/29 09:59:48 Done.
+ Expect.isFalse(got_type_error);
}

Powered by Google App Engine
This is Rietveld 408576698