Analyzer does not propogate the type of members inherited from Object #18063
Labels
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-enhancement
A request for a change that isn't a bug
This issue was originally filed by andrew.m...@gmail.com
=========
dynamic object; // At least it an "Object"
var string = object.toString();
=========
The "toString()" inherited from "Object" but "String" type does not propogated.
Even "bottom" type inherited from "Object".
=========
var bottom = null;
// Unnecessary type check, the result is always true
print(null is Object);
=========
This means that "toString()", which are always "Object.toString()", at least has upper bound type "String" on every type, include "dynamic".
But analyzer not take this into account.
The text was updated successfully, but these errors were encountered: