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

Unified Diff: pkg/kernel/lib/transformations/setup_builtin_library.dart

Issue 2612873005: Allow main to be null for modular tranformation. (Closed)
Patch Set: Created 3 years, 11 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/kernel/lib/transformations/setup_builtin_library.dart
diff --git a/pkg/kernel/lib/transformations/setup_builtin_library.dart b/pkg/kernel/lib/transformations/setup_builtin_library.dart
index cc4149a74e908c2e7f6f27f23959ee9d10cede9b..c04d05091eec28a044e00bb26479657905bb54aa 100644
--- a/pkg/kernel/lib/transformations/setup_builtin_library.dart
+++ b/pkg/kernel/lib/transformations/setup_builtin_library.dart
@@ -13,6 +13,8 @@ Program transformProgram(Program program,
{String libraryUri: 'dart:_builtin'}) {
Procedure mainMethod = program.mainMethod;
+ if (mainMethod == null) return program;
+
Library builtinLibrary;
for (Library library in program.libraries) {
if (library.importUri.toString() == libraryUri) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698