| Index: tests/language/on_catch_malformed_type_test.dart
|
| diff --git a/tests/language/on_catch_malformed_type_test.dart b/tests/language/on_catch_malformed_type_test.dart
|
| index ae5e0432f08a5440ed89ff1ab85622cfedc3b611..515414d9a38eff096228164e4d90af470feb7b9e 100644
|
| --- a/tests/language/on_catch_malformed_type_test.dart
|
| +++ b/tests/language/on_catch_malformed_type_test.dart
|
| @@ -2,29 +2,9 @@
|
| // 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.
|
|
|
| -// Check that malformed types in on-catch are handled correctly, that is
|
| -// catches all in production mode and throws a type error in checked mode.
|
| -
|
| -isCheckedMode() {
|
| - try {
|
| - String s = 1;
|
| - return false;
|
| - } on TypeError catch(e) {
|
| - return true;
|
| - }
|
| -}
|
| -
|
| -checkTypeError(f()) {
|
| - if(isCheckedMode()) {
|
| - try {
|
| - f();
|
| - Expect.fail("Type error expected in checking mode");
|
| - } on TypeError catch(ok) {
|
| - }
|
| - } else {
|
| - f();
|
| - }
|
| -}
|
| +// Check that malformed types in on-catch are handled correctly, that is,
|
| +// are treated as dynamic and thus catches all in bith production and checked
|
| +// mode.
|
|
|
| catchUnresolvedBefore() {
|
| try {
|
| @@ -52,5 +32,5 @@ catchUnresolvedAfter() {
|
|
|
| main() {
|
| catchUnresolvedBefore();
|
| - checkTypeError(catchUnresolvedAfter);
|
| + catchUnresolvedAfter();
|
| }
|
|
|