Analyzer not warning when overriding method does not include the same default values #18914
Labels
analyzer-test
area-analyzer
Use area-analyzer for Dart analyzer issues, including the analysis server and code completion.
Milestone
Section of the specification states:
It is a static warning if an instance method m1 overrides an instance member m2, the signature of m2 explicitly specifies a default value for a formal parameter p and the signature of m1 specifies a different default value for p.
But the following code produces no warning:
class A {
foo([x = 1]) {}
}
class B extends A {
foo([x]) {}
}
This is causing the co19 test Language/07_Classes/4_Abstract_Instance_Members_A07_t02 to fail.
The text was updated successfully, but these errors were encountered: