Analyzer doesn't recognize upgrading language version for existing classes/extensions #40609
Labels
area-analyzer
Use area-analyzer for Dart analyzer issues, including the analysis server and code completion.
The repro here is a bit weird, but you can do the following:
Run
pub get
(you must do this first).Create
lib/dog.dart
with these contentsThis correctly shows an error - our min SDK does not support extension methods.
>=2.7.0 <3.0.0
The analyzer will still say that the experiment is not enabled.
I also tried re-running pub get (to update the packag_config.json language version), as well as reloading the window to restart the analyzer (ctrl+shift+p then search for reload window).
I can create new classes and use extensions, but any pre-existing extensions will complain no matter what I do, so it seems that the error is cached somewhere.
EDIT: it appears making any actual edit to the file will resolve the issue as well - but undoing that edit will get me back to the old error. So likely some cache by content hash of the file is not getting invalidated?
The text was updated successfully, but these errors were encountered: