-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
area-devexpFor issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.For issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.
Description
I'm not exactly sure what the parser/resolver is doing here, but I could not come up with a simpler repro:
import 'package:analyzer/dart/ast/ast.dart';
void f(ClassMember member) {
if (member
case
FieldDeclaration(fields: VariableDeclarationList(
:^
))) {
}
}Interestingly, the same code but with a different formatting:
import 'package:analyzer/dart/ast/ast.dart';
void f(ClassMember member) {
if (member case FieldDeclaration(fields: VariableDeclarationList(:^))) {}
}Works as intended.
I'll look into this. I've tested it superficially, and it seems to be a simple fix. The difference between these is that the first case is trying to add completion in a PatternFieldName after the colon (which we currently don't handle), and the second case is trying to add completion in a PatternField.
FYI @bwilkerson @srawlins
Metadata
Metadata
Assignees
Labels
area-devexpFor issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.For issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.