dart-lang / sdk

The Dart SDK, including the VM, JS and Wasm compilers, analysis, core libraries, and more.
https://dart.dev
BSD 3-Clause "New" or "Revised" License
10.2k stars 1.57k forks source link

kernel fuzz assertion failure: invalidly typed var in ui-as-code for-element #38251

Open MichaelRFairhurst opened 5 years ago

MichaelRFairhurst commented 5 years ago

a={for(t l in

Unhandled exception:
Crash when compiling null,
at character offset null:
'package:kernel/ast.dart': Failed assertion: line 4864 pos 12: 'type != null': is not true.
#0      _AssertionError._doThrowNew (dart:core-patch/errors_patch.dart:40:39)
#1      _AssertionError._throwNew (dart:core-patch/errors_patch.dart:36:5)
#2      new VariableDeclaration (package:kernel/ast.dart:4864:12)
#3      InferenceVisitor.handleForInDeclaringVariable (package:front_end/src/fasta/kernel/inference_visitor.dart:314:13)
#4      InferenceVisitor.inferElement (package:front_end/src/fasta/kernel/inference_visitor.dart:850:9)
#5      InferenceVisitor.visitSetLiteralJudgment (package:front_end/src/fasta/kernel/inference_visitor.dart:1809:25)
#6      SetLiteralJudgment.acceptInference (package:front_end/src/fasta/kernel/kernel_shadow_ast.dart:1004:20)
#7      ShadowTypeInferrer.inferExpression (package:front_end/src/fasta/kernel/kernel_shadow_ast.dart:1511:27)
#8      FieldBuilder.inferType (package:front_end/src/fasta/builder/field_builder.dart:219:53)
#9      SourceLoader.performTopLevelInference (package:front_end/src/fasta/source/source_loader.dart:1033:35)
#10     KernelTarget.buildOutlines.<anonymous closure> (package:front_end/src/fasta/kernel/kernel_target.dart:280:14)
jensjoha commented 4 years ago

/cc @johnniwinther