mirror of
https://github.com/dart-lang/sdk
synced 2024-09-22 05:41:18 +00:00
dc602ae96d
The VM registers code objects that depend on deferred library prefixes, e.g. when calling a function in the deferred library. We didn’t do this when instantiating a type from the deferred library. This is a fix for issue 22443. R=regis@google.com Review URL: https://codereview.chromium.org//1037343002 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44757 260f80e4-7a28-3924-810f-c04153c831b5
24 lines
565 B
Dart
24 lines
565 B
Dart
// Copyright (c) 2015, 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.
|
|
|
|
import 'regress_22443_lib.dart' deferred as D;
|
|
import 'package:expect/expect.dart';
|
|
|
|
int fooCount = 0;
|
|
|
|
foo() {
|
|
fooCount++;
|
|
return new D.LazyClass();
|
|
}
|
|
|
|
main() {
|
|
var caughtIt = false;
|
|
try { foo(); } catch (e) { caughtIt = true; };
|
|
D.loadLibrary().then((_) {
|
|
foo();
|
|
Expect.isTrue(caughtIt);
|
|
Expect.equals(2, fooCount);
|
|
});
|
|
}
|