-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
area-dart-modelFor issues related to conformance to the language spec in the parser, compilers or the CLI analyzer.For issues related to conformance to the language spec in the parser, compilers or the CLI analyzer.
Description
Note: this issue is a reformulation of flutter/flutter#161479 for the Dart SDK repo.
Consider the following program:
abstract class A {
Function get fooFunction;
dynamic get fooDynamic;
void fooRegular(Object? arg);
Never get fooNever;
void bar() {}
test() {
fooFunction(bar());
fooDynamic(bar());
fooRegular(bar());
fooNever(bar());
}
}All of the invocations in test should be reported in a compile-time error (see the discussion here). However, the Analyzer only reports the error for fooRegular and doesn't report it for fooFunction, fooDynamic, or fooNever (the latter may not be a strict requirement, however, since the actual invocation will never happen in practice).
Metadata
Metadata
Assignees
Labels
area-dart-modelFor issues related to conformance to the language spec in the parser, compilers or the CLI analyzer.For issues related to conformance to the language spec in the parser, compilers or the CLI analyzer.