Do not record binary types for units with errors, this can lead to an invalid state.

Review by: spoon (postmortem)


git-svn-id: https://google-web-toolkit.googlecode.com/svn/releases/1.6@4238 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/dev/core/src/com/google/gwt/dev/javac/JdtCompiler.java b/dev/core/src/com/google/gwt/dev/javac/JdtCompiler.java
index 8ca9fd8..6bb5875 100644
--- a/dev/core/src/com/google/gwt/dev/javac/JdtCompiler.java
+++ b/dev/core/src/com/google/gwt/dev/javac/JdtCompiler.java
@@ -103,7 +103,9 @@
       CompilationUnitAdapter adapter = (CompilationUnitAdapter) icu;
       CompilationUnit unit = adapter.getUnit();
       unit.setJdtCud(cud);
-      recordBinaryTypes(unit.getCompiledClasses());
+      if (!cud.compilationResult().hasErrors()) {
+        recordBinaryTypes(unit.getCompiledClasses());
+      }
     }
   }