-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
area-vmUse area-vm for VM related issues, including code coverage, and the AOT and JIT backends.Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends.cfe-expression-compilationIssues related to expression compilation in the CFEIssues related to expression compilation in the CFElegacy-area-front-endLegacy: Use area-dart-model instead.Legacy: Use area-dart-model instead.vm-debugger
Description
Repro:
void main() {
foo();
}
void foo() {
bar({
for (var i = 0; i < 10; i++) (i,),
});
}
void bar(Set<(int,)> things) {
baz(things);
}
int baz(Set<(int,)> things) => things.fold(0, (a, b) => a + b.$1);Add a breakpoint inside bar.
Now add baz(things) to watch or run this on the debug console and see:
evaluateInFrame: (113) Expression compilation error
org-dartlang-debug:synthetic_debug_expression:1:5: Error: The argument type '_Set<dynamic>' can't be assigned to the parameter type 'Set<(int)>'.
- '_Set' is from 'dart:_compact_hash'.
- 'Set' is from 'dart:core'.
baz(things)
^If you change the expression to baz(things.cast()) it works.
I did some experimenting and if you remove the Record from this and use only int the expression is evaluated correctly.
Could this be related to the problems we talked about in this issue that surround Records not having an element?
CC: @DanTup, @bwilkerson
cleberlz
Metadata
Metadata
Assignees
Labels
area-vmUse area-vm for VM related issues, including code coverage, and the AOT and JIT backends.Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends.cfe-expression-compilationIssues related to expression compilation in the CFEIssues related to expression compilation in the CFElegacy-area-front-endLegacy: Use area-dart-model instead.Legacy: Use area-dart-model instead.vm-debugger