| Index: compiler/java/com/google/dart/compiler/DartCompiler.java
|
| ===================================================================
|
| --- compiler/java/com/google/dart/compiler/DartCompiler.java (revision 11088)
|
| +++ compiler/java/com/google/dart/compiler/DartCompiler.java (working copy)
|
| @@ -16,6 +16,7 @@
|
| import com.google.dart.compiler.ast.DartDirective;
|
| import com.google.dart.compiler.ast.DartLibraryDirective;
|
| import com.google.dart.compiler.ast.DartNode;
|
| +import com.google.dart.compiler.ast.DartPartOfDirective;
|
| import com.google.dart.compiler.ast.DartToSourceVisitor;
|
| import com.google.dart.compiler.ast.DartUnit;
|
| import com.google.dart.compiler.ast.LibraryNode;
|
| @@ -697,7 +698,7 @@
|
| // don't need to check a unit that hasn't changed
|
| continue;
|
| }
|
| - if (unit.getDirectives().size() > 0) {
|
| + if (invalidDirectivesForPart(unit.getDirectives())) {
|
| // find corresponding source node for this unit
|
| for (LibraryNode sourceNode : lib.getSourcePaths()) {
|
| if (sourceNode == lib.getSelfSourcePath()) {
|
| @@ -717,6 +718,14 @@
|
| }
|
| }
|
|
|
| + private boolean invalidDirectivesForPart(List<DartDirective> directives) {
|
| + int size = directives.size();
|
| + if (size == 1) {
|
| + return !(directives.get(0) instanceof DartPartOfDirective);
|
| + }
|
| + return size > 0;
|
| + }
|
| +
|
| private void setEntryPoint() {
|
| LibraryUnit lib = context.getAppLibraryUnit();
|
| lib.setEntryNode(new LibraryNode(MAIN_ENTRY_POINT_NAME));
|
|
|