Skip to content

Crashing, regression with generic types #34856

@kevmoo

Description

@kevmoo

Crashing on 5f4511a
Works fine on 2.1.0-dev.7.0

Sorry the repro is crazy. If I have time, I'll try to make it easier.

  1. Sync https://github.com/kevmoo/graph (verified at master kevmoo/graph@e19a763)
  2. pub get
  3. pub run test
  Failed to load "test/graph_test.dart":
  Unable to spawn isolate: Type parameter dart.collection::UnmodifiableMapView::K is not indexed
  #0      TypeParameterIndexer.[] (package:kernel/binary/ast_to_binary.dart:2055:28)
  #1      BinaryPrinter.visitTypeParameterType (package:kernel/binary/ast_to_binary.dart:1678:38)
  #2      TypeParameterType.accept (package:kernel/ast.dart:4890:34)
  #3      BinaryPrinter.writeNode (package:kernel/binary/ast_to_binary.dart:250:10)
  #4      LimitedBinaryPrinter.writeNode (package:kernel/binary/limited_ast_to_binary.dart:55:11)
  #5      BinaryPrinter.writeNodeList (package:kernel/binary/ast_to_binary.dart:242:7)
  #6      BinaryPrinter.visitInterfaceType (package:kernel/binary/ast_to_binary.dart:1629:7)
  #7      InterfaceType.accept (package:kernel/ast.dart:4629:34)
  #8      BinaryPrinter.writeNode (package:kernel/binary/ast_to_binary.dart:250:10)
  #9      LimitedBinaryPrinter.writeNode (package:kernel/binary/limited_ast_to_binary.dart:55:11)
  #10     BinaryPrinter.writeVariableDeclaration (package:kernel/binary/ast_to_binary.dart:1573:5)
  #11     List.forEach (dart:core/runtime/libgrowable_array.dart:278:8)
  #12     BinaryPrinter.writeList (package:kernel/binary/ast_to_binary.dart:234:11)
  #13     BinaryPrinter.writeVariableDeclarationList (package:kernel/binary/ast_to_binary.dart:1581:5)
  #14     BinaryPrinter.visitFunctionNode (package:kernel/binary/ast_to_binary.dart:977:5)
  #15     FunctionNode.accept (package:kernel/ast.dart:2077:30)
  #16     BinaryPrinter.writeNode (package:kernel/binary/ast_to_binary.dart:250:10)
  #17     LimitedBinaryPrinter.writeNode (package:kernel/binary/limited_ast_to_binary.dart:55:11)
  #18     BinaryPrinter.visitConstructor (package:kernel/binary/ast_to_binary.dart:809:5)
  #19     Constructor.accept (package:kernel/ast.dart:1367:32)
  #20     BinaryPrinter.writeNode (package:kernel/binary/ast_to_binary.dart:250:10)
  #21     LimitedBinaryPrinter.writeNode (package:kernel/binary/limited_ast_to_binary.dart:55:11)
  #22     BinaryPrinter.writeNodeList (package:kernel/binary/ast_to_binary.dart:242:7)
  #23     BinaryPrinter.visitClass (package:kernel/binary/ast_to_binary.dart:770:5)
  #24     Class.accept (package:kernel/ast.dart:972:30)
  #25     BinaryPrinter.writeNode (package:kernel/binary/ast_to_binary.dart:250:10)
  #26     LimitedBinaryPrinter.writeNode (package:kernel/binary/limited_ast_to_binary.dart:55:11)
  #27     BinaryPrinter.writeNodeList (package:kernel/binary/ast_to_binary.dart:242:7)
  #28     BinaryPrinter.visitLibrary (package:kernel/binary/ast_to_binary.dart:620:5)
  #29     Library.accept (package:kernel/ast.dart:409:30)
  #30     BinaryPrinter.writeNode (package:kernel/binary/ast_to_binary.dart:250:10)
  #31     LimitedBinaryPrinter.writeNode (package:kernel/binary/limited_ast_to_binary.dart:55:11)
  #32     List.forEach (dart:core/runtime/libgrowable_array.dart:278:8)
  #33     BinaryPrinter.writeList (package:kernel/binary/ast_to_binary.dart:234:11)
  #34     LimitedBinaryPrinter.writeLibraries (package:kernel/binary/limited_ast_to_binary.dart:49:5)
  #35     BinaryPrinter.writeComponentFile (package:kernel/binary/ast_to_binary.dart:328:5)
  #36     serializeComponent (package:front_end/src/fasta/kernel/utils.dart:68:11)
  #37     _processLoadRequest (file:///Users/kevmoo/source/github/dart/sdk/pkg/vm/bin/kernel_service.dart:444:11)
  <asynchronous suspension>
  #38     _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:171:12)
00:01 +0 -1: Some tests failed.

Metadata

Metadata

Labels

P1A high priority bug; for example, a single project is unusable or has many test failurescrashProcess exits with SIGSEGV, SIGABRT, etc. An unhandled exception is not a crash.front-end-kernellegacy-area-front-endLegacy: Use area-dart-model instead.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions