Index: pkg/front_end/lib/src/incremental_kernel_generator_impl.dart |
diff --git a/pkg/front_end/lib/src/incremental_kernel_generator_impl.dart b/pkg/front_end/lib/src/incremental_kernel_generator_impl.dart |
index d75a0fc7d25e13d750e189cd41b3b71caadb7d22..da49e55bfcf118a16a04dff9224505b51f1b8b0e 100644 |
--- a/pkg/front_end/lib/src/incremental_kernel_generator_impl.dart |
+++ b/pkg/front_end/lib/src/incremental_kernel_generator_impl.dart |
@@ -135,6 +135,16 @@ class IncrementalKernelGeneratorImpl implements IncrementalKernelGenerator { |
// contents to compute signatures (not just API parts). So, every library |
// that imports a changed one, is affected. |
+ // Set the main procedure. |
+ for (var library in program.libraries) { |
+ if (library.fileUri == _entryPoint.toString()) { |
+ program.mainMethod = library.procedures.firstWhere( |
+ (procedure) => procedure.name.name == 'main', |
+ orElse: () => null); |
+ break; |
+ } |
+ } |
+ |
return new DeltaProgram(program); |
}); |
} |