Skip to content

co19/LanguageFeatures/Patterns/scope_A04_t03: type 'Scope' is not a subtype of type 'Token' of ' in type cast' #51327

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
alexmarkov opened this issue Feb 8, 2023 · 1 comment
Assignees
Labels
legacy-area-front-end Legacy: Use area-dart-model instead.

Comments

@alexmarkov
Copy link
Contributor

Part of #49749.

co19/LanguageFeatures/Patterns/scope_A04_t03 crashes front-end in the following way:

Crash when compiling file:///b/s/w/ir/tests/co19/src/LanguageFeatures/Patterns/scope_A04_t03.dart at character offset 1455:
type 'Scope' is not a subtype of type 'Token' of ' in type cast'

#0      BodyBuilder.endIfControlFlow (package:front_end/src/fasta/kernel/body_builder.dart:6482:27)
#1      IfComplete.parse (package:_fe_analyzer_shared/src/parser/literal_entry_info_impl.dart:212:23)
#2      Parser.parseLiteralListSuffix (package:_fe_analyzer_shared/src/parser/parser_impl.dart:6502:24)
#3      Parser.parsePrimary (package:_fe_analyzer_shared/src/parser/parser_impl.dart:6231:14)
#4      Parser.parseUnaryExpression (package:_fe_analyzer_shared/src/parser/parser_impl.dart:6081:12)
#5      Parser.parsePrecedenceExpression (package:_fe_analyzer_shared/src/parser/parser_impl.dart:5627:13)
#6      Parser.parseExpression (package:_fe_analyzer_shared/src/parser/parser_impl.dart:5567:15)
#7      Parser.parseReturnStatement (package:_fe_analyzer_shared/src/parser/parser_impl.dart:5470:13)
#8      Parser.parseStatementX (package:_fe_analyzer_shared/src/parser/parser_impl.dart:5342:14)
#9      Parser.parseStatement (package:_fe_analyzer_shared/src/parser/parser_impl.dart:5315:20)
#10     Parser.parseFunctionBody (package:_fe_analyzer_shared/src/parser/parser_impl.dart:5220:15)
#11     DietListener.buildFunctionBody (package:front_end/src/fasta/source/diet_listener.dart:1120:14)
#12     DietListener.endTopLevelMethod (package:front_end/src/fasta/source/diet_listener.dart:376:5)
#13     Parser.parseTopLevelMethod (package:_fe_analyzer_shared/src/parser/parser_impl.dart:3682:14)
#14     Parser.parseTopLevelMemberImpl (package:_fe_analyzer_shared/src/parser/parser_impl.dart:3424:14)
#15     Parser.parseTopLevelDeclarationImpl (package:_fe_analyzer_shared/src/parser/parser_impl.dart:606:14)
#16     Parser.parseUnit (package:_fe_analyzer_shared/src/parser/parser_impl.dart:403:15)
#17     SourceLoader.buildBody (package:front_end/src/fasta/source/source_loader.dart:1267:12)
<asynchronous suspension>
#18     SourceLoader.buildBodies (package:front_end/src/fasta/source/source_loader.dart:676:7)
<asynchronous suspension>
#19     KernelTarget.buildComponent.<anonymous closure> (package:front_end/src/fasta/kernel/kernel_target.dart:611:7)
<asynchronous suspension>
#20     withCrashReporting (package:front_end/src/fasta/crash.dart:136:12)
<asynchronous suspension>
#21     _buildInternal (package:front_end/src/kernel_generator_impl.dart:206:19)
<asynchronous suspension>
#22     withCrashReporting (package:front_end/src/fasta/crash.dart:136:12)
<asynchronous suspension>
#23     generateKernel.<anonymous closure> (package:front_end/src/kernel_generator_impl.dart:48:12)
<asynchronous suspension>
#24     generateKernel (package:front_end/src/kernel_generator_impl.dart:47:10)
<asynchronous suspension>
#25     kernelForModule (package:front_end/src/api_prototype/kernel_generator.dart:100:11)
<asynchronous suspension>
#26     SingleShotCompilerWrapper.compileInternal (file:///b/s/w/ir/cache/builder/sdk/pkg/vm/bin/kernel_service.dart:407:11)
<asynchronous suspension>
#27     Compiler.compile.<anonymous closure> (file:///b/s/w/ir/cache/builder/sdk/pkg/vm/bin/kernel_service.dart:215:45)
<asynchronous suspension>
#28     _processLoadRequest (file:///b/s/w/ir/cache/builder/sdk/pkg/vm/bin/kernel_service.dart:889:37)
<asynchronous suspension>

--- Re-run this test:
python3 tools/test.py -n dartk-strong-linux-release-x64 co19/LanguageFeatures/Patterns/scope_A04_t03

@johnniwinther @chloestefantsova

@alexmarkov alexmarkov added the legacy-area-front-end Legacy: Use area-dart-model instead. label Feb 8, 2023
@chloestefantsova chloestefantsova self-assigned this Feb 9, 2023
@chloestefantsova
Copy link
Contributor

This appears to be fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
legacy-area-front-end Legacy: Use area-dart-model instead.
Projects
None yet
Development

No branches or pull requests

2 participants