Closed sigmundch closed 3 months ago
Summary: Global type inference fails to correctly infer the type of a closure invoked through a field named call
, leading to incorrect type checks and unexpected behavior. This issue manifests when using the call
getter and can be resolved by disabling global type inference.
This is a reduction from https://github.com/flutter/flutter/issues/151978
It appears that global type inference doesn't properly trace a closure invocation when the closure is stored in a field named
call
. For example:This program should print
true
twice, but currently printsfalse
on the first case when using thecall
getter`. Disabling global type inference does make this print true as it should.