Skip to content

Extension methods appear to break on export #38794

@vsmenon

Description

@vsmenon

Patch this to the existing modular extension test:

https://dart-review.googlesource.com/c/sdk/+/120925

and run:

dart pkg/dev_compiler/test/modular_suite.dart -v --filter extension

I hit the following error:

stderr:
Unhandled exception:
Crash when compiling null,
at character offset null:
dev-dart-app:/def2.dart: Internal problem: Unhandled Extension in finalizeExports.
#0      internalProblem (package:front_end/src/fasta/problems.dart:45:3)
#1      unhandled (package:front_end/src/fasta/problems.dart:58:10)
#2      DillLibraryBuilder.finalizeExports (package:front_end/src/fasta/dill/dill_library_builder.dart:301:9)
#3      DillLibraryBuilder.ensureLoaded (package:front_end/src/fasta/dill/dill_library_builder.dart:133:7)
#4      LazyLibraryScope.local (package:front_end/src/fasta/dill/dill_library_builder.dart:77:20)
#5      Scope.forEach (package:front_end/src/fasta/scope.dart:332:5)
#6      Import.finalizeImports (package:front_end/src/fasta/import.dart:72:26)
#7      SourceLibraryBuilder.addImportsToScope (package:front_end/src/fasta/source/source_library_builder.dart:1021:14)
#8      SourceLoader.computeLibraryScopes.<anonymous closure> (package:front_end/src/fasta/source/source_loader.dart:427:23)
#9      _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:377:8)
#10     SourceLoader.computeLibraryScopes (package:front_end/src/fasta/source/source_loader.dart:424:14)
#11     KernelTarget.buildOutlines.<anonymous closure> (package:front_end/src/fasta/kernel/kernel_target.dart:256:14)
<asynchronous suspension>
#12     withCrashReporting (package:front_end/src/fasta/crash.dart:122:24)
<asynchronous suspension>
#13     KernelTarget.buildOutlines (package:front_end/src/fasta/kernel/kernel_target.dart:249:12)
<asynchronous suspension>
#14     generateKernelInternal.<anonymous closure> (package:front_end/src/kernel_generator_impl.dart:122:28)
<asynchronous suspension>
#15     withCrashReporting (package:front_end/src/fasta/crash.dart:122:24)
<asynchronous suspension>
#16     generateKernelInternal (package:front_end/src/kernel_generator_impl.dart:69:10)
<asynchronous suspension>
#17     generateKernel.<anonymous closure> (package:front_end/src/kernel_generator_impl.dart:49:18)
<asynchronous suspension>
#18     CompilerContext.runWithOptions.<anonymous closure> (package:front_end/src/fasta/compiler_context.dart:136:20)
<asynchronous suspension>
#19     CompilerContext.runInContext.<anonymous closure>.<anonymous closure> (package:front_end/src/fasta/compiler_context.dart:124:46)
#20     new Future.sync (dart:async/future.dart:224:31)
#21     CompilerContext.runInContext.<anonymous closure> (package:front_end/src/fasta/compiler_context.dart:124:19)
#22     _rootRun (dart:async/zone.dart:1124:13)
#23     _CustomZone.run (dart:async/zone.dart:1021:19)
#24     _runZoned (dart:async/zone.dart:1516:10)
#25     runZoned (dart:async/zone.dart:1463:12)
#26     CompilerContext.runInContext (package:front_end/src/fasta/compiler_context.dart:123:12)
#27     CompilerContext.runWithOptions (package:front_end/src/fasta/compiler_context.dart:134:10)
#28     generateKernel (package:front_end/src/kernel_generator_impl.dart:48:32)
<asynchronous suspension>
#29     _compile (package:front_end/src/api_unstable/bazel_worker.dart:138:10)
#30     compileSummary (package:front_end/src/api_unstable/bazel_worker.dart:147:33)
<asynchronous suspension>
#31     computeKernel (file:///Users/vsm/dart/sdk/utils/bazel/kernel_worker.dart:353:20)
<asynchronous suspension>
#32     main (file:///Users/vsm/dart/sdk/utils/bazel/kernel_worker.dart:40:24)

Metadata

Metadata

Assignees

No one assigned

    Labels

    P0A serious issue requiring immediate resolutionlegacy-area-front-endLegacy: Use area-dart-model instead.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions