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

dart2js does not emit a warning when implementing Function without a call method #19547

Closed
mkustermann opened this issue Jun 19, 2014 · 2 comments
Assignees
Labels
P3 A lower priority bug or feature request web-dart2js

Comments

@mkustermann
Copy link
Member

The following example

class Printer implements Function {}

main() {
  var printer = new Printer();
}

gives a warning with the analyzer

$ dartanalyzer test.dart
Analyzing [test.dart]...
[warning] Concrete classes that implement Function must implement the method call() (test.dart, line 2, col 7)
1 warning found.

does not give a warning with dart2js
$ dart2js test.dart
Dart file (test.dart) compiled to JavaScript: out.js

According to the specification:

Function Types:
...
It is a static warning if a concrete class implements Function and does not have a concrete method named call() unless that class declares its own implementation of noSuchMethod().
...

Seems like a bug in dart2js

@floitschG
Copy link
Contributor

Set owner to @johnniwinther.
Removed Priority-Unassigned label.
Added Priority-Low label.

@srawlins
Copy link
Member

Johnni fixed this with https://code.google.com/p/dart/source/detail?r=37851


Added Fixed label.

@mkustermann mkustermann added Type-Defect P3 A lower priority bug or feature request web-dart2js labels Sep 24, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 A lower priority bug or feature request web-dart2js
Projects
None yet
Development

No branches or pull requests

4 participants