Static warning when concrete class extends Function and does not have call() #16280
Labels
area-analyzer
Use area-analyzer for Dart analyzer issues, including the analysis server and code completion.
closed-not-planned
Closed as we don't intend to take action on the reported issue
Milestone
This issue was originally filed by yu.asakusa...@gmail.com
What steps will reproduce the problem?
class MyClass extends Function {}
What is the expected output? What do you see instead?
Actual warning:
“Concrete classes that implement Function must implement the method call()”
but note that MyClass does not implement Function. It extends Function.
What version of the product are you using? On what operating system?
Dart Editor version 1.2.0.edge_031984
Dart SDK version 1.2.0-edge.31984
downloaded from
http://storage.googleapis.com/dart-archive/channels/be/raw/latest/editor/darteditor-windows-x64.zip
Please provide any additional information below.
I think that there are two issues here.
First, it is unclear whether this case should be a static warning or not according to the language specification 1.1. Section 15.5, “Function Types”, states:
> It is a static warning if a concrete class implements Function and does not have a concrete method named call().
but I cannot find an analogous description of the case where the class in question extends Function.
Judging from issue #7780, the intent seems to be that this case should also be a static warning.
Second, provided that this is indeed a static warning, the warning message is not exactly correct. It should be something along:
“Concrete classes that extend or implement Function must implement the method call()”
The text was updated successfully, but these errors were encountered: