From 5ff19ad4ffc535ec6996dcda538091e7e69baaba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20von=20der=20Ah=C3=A9?= Date: Wed, 11 Jan 2017 12:31:38 +0100 Subject: [PATCH] Allow main to be null for modular tranformation. R=asgerf@google.com Review-Url: https://codereview.chromium.org/2612873005 . --- pkg/kernel/lib/transformations/setup_builtin_library.dart | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/kernel/lib/transformations/setup_builtin_library.dart b/pkg/kernel/lib/transformations/setup_builtin_library.dart index cc4149a74e9..c04d05091ee 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) {