-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
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.triagedIssue has been triaged by sub teamIssue has been triaged by sub team
Description
Say you have
class A {}
class B extends A {
int foo() => 0;
}
class C {
C(this.a);
A a;
}
void main() {
var c = C(B()); // Breakpoint here
}
Now you try to evaluate c.a.foo()
it gives you an error message about foo
not being defined for A
. But if you do (c.a as dynamic).foo()
everything works normally and it can result in 0
here.
Could the evaluations do something like this internally?
// CC @DanTup
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.triagedIssue has been triaged by sub teamIssue has been triaged by sub team