Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(747)

Unified Diff: pkg/front_end/lib/src/fasta/fasta.dart

Issue 2801853006: Produce a compile-time error if there's no main method. (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tests/co19/co19-kernel.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/front_end/lib/src/fasta/fasta.dart
diff --git a/pkg/front_end/lib/src/fasta/fasta.dart b/pkg/front_end/lib/src/fasta/fasta.dart
index ba3161808eb2e597fe0d894f5833f0ad0903d740..53da342394a6db6f115438e803202299f60094bf 100644
--- a/pkg/front_end/lib/src/fasta/fasta.dart
+++ b/pkg/front_end/lib/src/fasta/fasta.dart
@@ -185,6 +185,10 @@ Future<CompilationResult> parseScript(
return new CompilationResult.error(e.format());
}
+ if (program.mainMethod == null) {
+ return new CompilationResult.error("No 'main' method found.");
+ }
+
// Perform target-specific transformations.
target.performModularTransformations(program);
target.performGlobalTransformations(program);
« no previous file with comments | « no previous file | tests/co19/co19-kernel.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698