Index: tests/language/function_malformed_result_type_test.dart |
diff --git a/tests/language/function_malformed_result_type_test.dart b/tests/language/function_malformed_result_type_test.dart |
index d010be7ba0cfe17afc5a69e91020819db3c4b933..2895975348edb7f995ce69a83884e829a00ec57d 100644 |
--- a/tests/language/function_malformed_result_type_test.dart |
+++ b/tests/language/function_malformed_result_type_test.dart |
@@ -1,22 +1,13 @@ |
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
// for details. All rights reserved. Use of this source code is governed by a |
// BSD-style license that can be found in the LICENSE file. |
+ |
// Dart test for a function with a malformed result type. |
import "package:expect/expect.dart"; |
class C<T, U> {} |
-isCheckedMode() { |
- try { |
- var i = 1; |
- String s = i; |
- return false; |
- } catch (e) { |
- return true; |
- } |
-} |
- |
main() { |
{ |
C<int> f() => null; |
@@ -37,7 +28,8 @@ main() { |
} on TypeError catch (error) { |
got_type_error = true; |
} |
- // Type error expected in checked mode only. |
- Expect.isTrue(got_type_error == isCheckedMode()); |
+ // Type error not expected in production nor checked mode since C<int> |
+ // is handled like C<dynamic,dynamic>. |
+ Expect.isFalse(got_type_error); |
} |
} |