[analyzer] An explicitly instantiated instance method tearoff is parsed as starting with a prefix #46721
Labels
dart-model-analyzer-spec
Issues with the analyzer's implementation of the language spec
legacy-area-analyzer
Use area-devexp instead.
P2
A bug or feature request we're likely to work on
Consider the following program:
This program is rejected (as of ef8add0) by
dartanalyzer
with the following error messages:However,
a
is not an import prefix, it is a local variable. Presumably, the analyzer parser (or some other early step of the analysis) assumes that with constructs of the form<identifier> '.' <identifier> <typeArguments> '.'
, the first identifier must be an import prefix. That may have been true beforeconstructor-tearoffs
, but it isn't true with that feature, so the analyzer will need to investigate the situation more closely before it concludes that it is looking at an import prefix.The text was updated successfully, but these errors were encountered: