Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Analyzer does not propogate the type of members inherited from Object #18063

Closed
DartBot opened this issue Apr 7, 2014 · 4 comments
Closed

Analyzer does not propogate the type of members inherited from Object #18063

DartBot opened this issue Apr 7, 2014 · 4 comments
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

Comments

@DartBot
Copy link

DartBot commented Apr 7, 2014

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.

@bwilkerson
Copy link
Member

Added this to the Later milestone.
Removed Type-Defect, Priority-Unassigned labels.
Added Type-Enhancement, Priority-Medium, Area-Analyzer, Triaged labels.

@kasperl
Copy link

kasperl commented Jul 10, 2014

Removed this from the Later milestone.
Added Oldschool-Milestone-Later label.

@kasperl
Copy link

kasperl commented Aug 4, 2014

Removed Oldschool-Milestone-Later label.

@DartBot DartBot added Type-Enhancement area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. labels Aug 4, 2014
@kevmoo kevmoo added P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug and removed triaged labels Mar 1, 2016
@srawlins
Copy link
Member

I think this works today. DartPad seems happy anyways. It knows that toString() returns a String.

@srawlins srawlins changed the title Analyzer not propofates the type of members inherited from Object Analyzer does not propogate the type of members inherited from Object Apr 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

5 participants