[analyzer] Apparently no checks are performed for member accesses on an object of type X extends FutureOr<X>
#49555
Labels
analyzer-spec
Issues with the analyzer's implementation of the language spec
area-analyzer
Use area-analyzer for Dart analyzer issues, including the analysis server and code completion.
P2
A bug or feature request we're likely to work on
type-bug
Incorrect behavior (everything from a crash to more subtle misbehavior)
Consider the following program:
This program is accepted by the analyzer (
dart analyze
from 2.19.0-32.0.dev) with no issues. It looks like the boundX extends FutureOr<X>
creates confusion about how to check expressions whose type involvesX
.The interface of
X
should be taken from the bound, and the interface ofFutureOr<T>
is the interface ofObject
, for anyT
.The text was updated successfully, but these errors were encountered: