You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import 'dart:async';
import 'mylib.dart' deferred as D;
class A {
m() => print("here");
}
f(a, b) => new Future.microtask(() {});
class R {
var _i;
Future test_deferred() async {
var a = new A();
await D.loadLibrary();
await f(D.Clazz, D.v);
a.m();
}
}
main() async {
await new R().test_deferred();
}
mylib.dart
var v;
class Clazz { }
Expected output:
here
Actual output:
Unhandled exception:
NoSuchMethodError: The method 'm' was called on null.
Receiver: null
Tried calling: m()
#0 Object._noSuchMethod (dart:core-patch/object_patch.dart:44)
#1 Object.noSuchMethod (dart:core-patch/object_patch.dart:47)
...
...
The text was updated successfully, but these errors were encountered:
fsc8000
added
the
area-vm
Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends.
label
Feb 8, 2017
When referring to constants via a deferred prefix in an await expression
the transformation must make sure that the generated code before and after
the deferred load agree on the number of captured variables. (i.e. the number
of await-temp variables introduced by the await-transformer is the same)
This CL uses a temporary in the case of compile-time constants, because before
the deferred load, a reference lib.C is translated into a static getter which
also requires a temporary.
Fixes#28678[email protected]
Review-Url: https://codereview.chromium.org/2683973002 .
Repro:
mylib.dart
Expected output:
Actual output:
The text was updated successfully, but these errors were encountered: