Open DanTup opened 6 years ago
The code I'm stepping through looks like this:
Future<void> doAsyncStuff() async {
print("test"); // BREAKPOINT
await new Future.value(true);
print("test2");
await new Future.microtask(() => true);
print("test3");
await new Future.delayed(const Duration(milliseconds: 1));
print("done!");
}
For context, this is blocking us from writing some tests we'd like to have for Flutter.
I think for this case, the spec needs to be updated:
class BoundVariable {
/// [value] can be one of [InstanceRef] or [Sentinel].
dynamic value;
For above, we should add TypeArguments
, or instead reference the parent type, ObjRef
.
and, the assert should be updated to allow for TypeArgumentsRef
.
I've opened a PR that updates the spec. Once that's resolved (assuming it's correct) I'll take a look at this - looks like we already have a newVMTypeArgumentsRef
so possibly we can handle this in the caller of the function in the first screenshot (which is newVMInstanceRefOrSentinel
, but maybe should be renamed with this change).
I hit this failed assertion in
getStack
. It's expecting thetype
of aBoundVariable
to be@Instance
orInstance
but it's a@TypeArguments
:Here's the problematic JSON:
And here is the full stack response from the VM.