| Index: tests/compiler/dart2js_extra/deferred/deferred_function_test.dart
|
| diff --git a/tests/compiler/dart2js_extra/deferred/deferred_function_test.dart b/tests/compiler/dart2js_extra/deferred/deferred_function_test.dart
|
| index aad0c5739eb49cf49f602cee8e777f464ae5d2eb..e6f7f8827c8153204f08defedf3f41db687ef94d 100644
|
| --- a/tests/compiler/dart2js_extra/deferred/deferred_function_test.dart
|
| +++ b/tests/compiler/dart2js_extra/deferred/deferred_function_test.dart
|
| @@ -14,18 +14,15 @@ import 'dart:async';
|
|
|
| const lazy = const DeferredLibrary('deferred_function_library');
|
|
|
| -isNoSuchMethodError(e) => e is NoSuchMethodError;
|
| +isError(e) => e is Error;
|
|
|
| readFoo() {
|
| - // TODO(ahe): There is a problem with type inference of deferred
|
| - // function closures. We think they are never null.
|
| - if (new DateTime.now().millisecondsSinceEpoch == 87) return null;
|
| return lib.foo;
|
| }
|
|
|
| main() {
|
| - Expect.throws(() { lib.foo('a'); }, isNoSuchMethodError);
|
| - Expect.throws(readFoo, isNoSuchMethodError);
|
| + Expect.throws(() { lib.foo('a'); }, isError);
|
| + Expect.throws(readFoo, isError);
|
| int counter = 0;
|
| asyncStart();
|
| lazy.load().then((_) {
|
| @@ -45,6 +42,6 @@ main() {
|
| asyncEnd();
|
| });
|
| Expect.equals(0, counter);
|
| - Expect.throws(() { lib.foo('a'); }, isNoSuchMethodError);
|
| - Expect.throws(readFoo, isNoSuchMethodError);
|
| + Expect.throws(() { lib.foo('a'); }, isError);
|
| + Expect.throws(readFoo, isError);
|
| }
|
|
|