Coder Social home page Coder Social logo

Comments (3)

scheglov avatar scheglov commented on August 17, 2024 1

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

from sdk.

goderbauer avatar goderbauer commented on August 17, 2024

This also crashes during compilation:

org-dartlang-augmentation:/Users/goderbauer/dev/scratchpad/macros_playground/lib/main.dart-1:12:8: Error: Couldn't find constructor 'Foo'.
  }) = Foo;
       ^
org-dartlang-augmentation:/Users/goderbauer/dev/scratchpad/macros_playground/lib/main.dart-1:12:8: Error: Redirection constructor target not found: 'Foo'
  }) = Foo;
       ^
Unhandled exception:
Crash when compiling:
org-dartlang-augmentation:/Users/goderbauer/dev/scratchpad/macros_playground/lib/main.dart-1:8:17: Internal problem: Expected 'null', but got 'ReturnStatement'.
  const factory Bar({
                ^

#0      internalProblem (package:front_end/src/fasta/problems.dart:52)
#1      unexpected (package:front_end/src/fasta/problems.dart:78)
#2      RedirectingFactoryBuilder.setRedirectingFactoryBody (package:front_end/src/fasta/source/source_factory_builder.dart:384)
#3      ClassDeclarationMixin.resolveConstructors (package:front_end/src/fasta/source/class_declaration.dart:161)
#4      SourceLibraryBuilder.resolveConstructors (package:front_end/src/fasta/source/source_library_builder.dart:1652)
#5      SourceLibraryBuilder.resolveConstructors (package:front_end/src/fasta/source/source_library_builder.dart:1645)
#6      SourceLoader.resolveConstructors (package:front_end/src/fasta/source/source_loader.dart:1773)
#7      KernelTarget.buildOutlines.<anonymous closure> (package:front_end/src/fasta/kernel/kernel_target.dart:519)
<asynchronous suspension>
#8      withCrashReporting (package:front_end/src/fasta/crash.dart:133)
<asynchronous suspension>
#9      KernelTarget.buildOutlines (package:front_end/src/fasta/kernel/kernel_target.dart:424)
<asynchronous suspension>
#10     _buildInternal (package:front_end/src/kernel_generator_impl.dart:150)
<asynchronous suspension>
#11     withCrashReporting (package:front_end/src/fasta/crash.dart:133)
<asynchronous suspension>
#12     kernelForProgramInternal.<anonymous closure> (package:front_end/src/api_prototype/kernel_generator.dart:65)
<asynchronous suspension>
#13     CompilerContext.clear (package:front_end/src/fasta/compiler_context.dart:139)
<asynchronous suspension>
#14     kernelForProgramInternal (package:front_end/src/api_prototype/kernel_generator.dart:64)
<asynchronous suspension>
#15     kernelForProgram (package:front_end/src/api_prototype/kernel_generator.dart:50)
<asynchronous suspension>
#16     compileToKernel (package:vm/kernel_front_end.dart:469)
<asynchronous suspension>
#17     FrontendCompiler.compile (package:frontend_server/frontend_server.dart:639)
<asynchronous suspension>
#18     starter (package:frontend_server/starter.dart:101)
<asynchronous suspension>
#19     main (file:///Volumes/Work/s/w/ir/x/w/sdk/pkg/frontend_server/bin/frontend_server_starter.dart:13)
<asynchronous suspension>

Target kernel_snapshot failed: Exception

Command PhaseScriptExecution failed with a nonzero exit code
warning: Run script build phase 'Run Script' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'Flutter Assemble' from project 'Runner')
** BUILD FAILED **

from sdk.

goderbauer avatar goderbauer commented on August 17, 2024

As of Dart SDK version: 3.5.0-65.0.dev the analyzer warning is gone, but compilation still crashes:

Unhandled exception:
Crash when compiling:
org-dartlang-augmentation:/Users/goderbauer/dev/scratchpad/macros_playground/lib/main.dart-1:9:15: Internal problem: Expected 'null', but got 'ReturnStatement'.
const factory Counter({
              ^

#0      internalProblem (package:front_end/src/fasta/problems.dart:52)
#1      unexpected (package:front_end/src/fasta/problems.dart:78)
#2      RedirectingFactoryBuilder.setRedirectingFactoryBody (package:front_end/src/fasta/source/source_factory_builder.dart:384)
#3      ClassDeclarationMixin.resolveConstructors (package:front_end/src/fasta/source/class_declaration.dart:161)
#4      SourceLibraryBuilder.resolveConstructors (package:front_end/src/fasta/source/source_library_builder.dart:1652)
#5      SourceLibraryBuilder.resolveConstructors (package:front_end/src/fasta/source/source_library_builder.dart:1645)
#6      SourceLoader.resolveConstructors (package:front_end/src/fasta/source/source_loader.dart:1773)
#7      KernelTarget.buildOutlines.<anonymous closure> (package:front_end/src/fasta/kernel/kernel_target.dart:519)
<asynchronous suspension>
#8      withCrashReporting (package:front_end/src/fasta/crash.dart:133)
<asynchronous suspension>
#9      KernelTarget.buildOutlines (package:front_end/src/fasta/kernel/kernel_target.dart:424)
<asynchronous suspension>
#10     IncrementalCompiler.computeDelta.<anonymous closure> (package:front_end/src/fasta/incremental_compiler.dart:367)
<asynchronous suspension>
#11     CompilerContext.clear (package:front_end/src/fasta/compiler_context.dart:130)
<asynchronous suspension>
#12     IncrementalCompiler.compile (package:vm/incremental_compiler.dart:77)
<asynchronous suspension>
#13     FrontendCompiler.compile (package:frontend_server/frontend_server.dart:617)
<asynchronous suspension>
#14     listenAndCompile.<anonymous closure> (package:frontend_server/frontend_server.dart:1311)
<asynchronous suspension>
the Dart compiler exited unexpectedly.
the Dart compiler exited unexpectedly.

from sdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.