Closed
Description
Observed
The Dart Language Specification contains the following statement in the section "Classes > Instance Methods > The Method noSuchMethod":
Note that it must be a method that accepts one positional argument, in order to correctly override noSuchMethod in Object. For instance, it can have signature
noSuchMethod(Invocation i)
ornoSuchMethod(Object i, [String s])
,
However, if a method has the signature noSuchMethod(Object i, [String s])
, it yields a compiler error:
Expected
Probably the example is outdated and should use a nullable type for the second parameter.