[analyzer] Missing error for generic function instantiation on function object #46590
Labels
analyzer-spec
Issues with the analyzer's implementation of the language spec
area-analyzer
Use area-analyzer for Dart analyzer issues, including the analysis server and code completion.
P2
A bug or feature request we're likely to work on
Consider the following program:
The initialization of
g
is a compile-time error, becauseidVar
is a variable and not a function declaration. However, the analyzer (as of commit ffde158) does not report any errors for this program.With
--enable-experiment=constructor-tearoff
we should get an error at the explicit instantiationidVar<int>
as well, and that error is also missing. Note that this question was discussed here.Note that this should not be a breaking change, because the CFE already reports this error.
The text was updated successfully, but these errors were encountered: