You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ 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
The text was updated successfully, but these errors were encountered:
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
The text was updated successfully, but these errors were encountered: