Skip to content

Type inferencing / static analysis not working quite right in Dart Editor #4577

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

Closed
DartBot opened this issue Aug 17, 2012 · 4 comments
Closed
Labels
type-enhancement A request for a change that isn't a bug
Milestone

Comments

@DartBot
Copy link

DartBot commented Aug 17, 2012

This issue was originally filed by [email protected]


Dart Editor
Version 0.1.0.201208131139, Build 10597
Dart SDK version 10595

Given the following code:

    #import('dart:html');
                        
    class Ninja {
      void attack() {
        showMessage("My sword is deadly!");
      }
    }
                                                  
    void main() {
      var ninja = new Ninja();
      ninja.attackThem();
    }

    void showMessage(String message) {
      var div = query('#text');
      div.text = "${div.text} $message";
    }

I would expect Dart editor to infer that ninja is of type Ninja. It should then recognize that ninja.attackThem refers to a non-existant method, and it should complain. It doesn't.

@clayberg
Copy link

Added this to the Later milestone.
Removed Type-Defect label.
Added Type-Enhancement label.

@DartBot
Copy link
Author

DartBot commented Aug 21, 2012

This comment was originally written by [email protected]


This has been fixed in the latest release of the editor:

Version 0.1.0.201208201135, build 10994
Dart SDK version 10991


Added Verified label.

@clayberg
Copy link

Removed this from the Later milestone.
Added this to the M1 milestone.

@clayberg
Copy link

Added Fixed label.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

3 participants