Open lukechurch opened 6 years ago
Small reproduction case:
class MissingSemicolon {
static int a = 10;
static const int b = MissingSemicolon.a+MissingSemicolon.a
MissingSemicolon() {}
}
If the initializer is shortened to MissingSemicolon.a
, a different exception occurs:
Unhandled exception:
type 'Scope' is not a subtype of type 'Identifier' of 'identifier' where
Scope is from package:front_end/src/fasta/scope.dart
Identifier is from package:front_end/src/fasta/kernel/body_builder.dart
#0 BodyBuilder.finishFields (package:front_end/src/fasta/kernel/body_builder.dart:436:31)
#1 DietListener.listenerFinishFields (package:front_end/src/fasta/source/diet_listener.dart:668:14)
#2 DietListener.parseFields (package:front_end/src/fasta/source/diet_listener.dart:713:5)
#3 DietListener.buildFields (package:front_end/src/fasta/source/diet_listener.dart:554:5)
#4 DietListener.endFields (package:front_end/src/fasta/source/diet_listener.dart:224:5)
#5 Parser.parseFields (package:front_end/src/fasta/parser/parser.dart:2578:16)
#6 Parser.parseClassMember (package:front_end/src/fasta/parser/parser.dart:3257:11)
#7 Parser.parseClassBody (package:front_end/src/fasta/parser/parser.dart:3126:15)
#8 Parser.parseClass (package:front_end/src/fasta/parser/parser.dart:1390:13)
#9 Parser.parseClassOrNamedMixinApplication (package:front_end/src/fasta/parser/parser.dart:1349:14)
#10 Parser.parseTopLevelKeywordDeclaration (package:front_end/src/fasta/parser/parser.dart:434:14)
#11 Parser.parseTopLevelDeclarationImpl (package:front_end/src/fasta/parser/parser.dart:365:14)
#12 Parser.parseUnit (package:front_end/src/fasta/parser/parser.dart:308:15)
#13 SourceLoader.buildBody (package:front_end/src/fasta/source/source_loader.dart:181:14)
No longer crashes.
Crash in fasta @peter-ahe-google id: 2f4144096b61139e62826ec1121a2b6703c4fbad