Fix static warnings spotted by dartc.

Review URL: https://codereview.chromium.org//15743003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23015 260f80e4-7a28-3924-810f-c04153c831b5
diff --git a/sdk/lib/_internal/compiler/implementation/types/simple_types_inferrer.dart b/sdk/lib/_internal/compiler/implementation/types/simple_types_inferrer.dart
index 7afb22f..587e404 100644
--- a/sdk/lib/_internal/compiler/implementation/types/simple_types_inferrer.dart
+++ b/sdk/lib/_internal/compiler/implementation/types/simple_types_inferrer.dart
@@ -771,8 +771,8 @@
     element = element.implementation;
     if (isNativeElement(element) && element.isField()) {
       var type = typeOf.putIfAbsent(element, () {
-        InterfaceType type = element.computeType(compiler).asRaw();
-        return type.isDynamic ? dynamicType : new TypeMask.subtype(type);
+        InterfaceType rawType = element.computeType(compiler).asRaw();
+        return rawType.isDynamic ? dynamicType : new TypeMask.subtype(rawType);
       });
       assert(type != null);
       return type;
diff --git a/sdk/lib/_internal/compiler/implementation/types/union_type_mask.dart b/sdk/lib/_internal/compiler/implementation/types/union_type_mask.dart
index 1ab7f11..82865d5 100644
--- a/sdk/lib/_internal/compiler/implementation/types/union_type_mask.dart
+++ b/sdk/lib/_internal/compiler/implementation/types/union_type_mask.dart
@@ -30,8 +30,9 @@
       } else if (mask.isEmpty && !mask.isNullable) {
         continue;
       } else {
-        assert(mask.base == null || mask.base.element != compiler.dynamicClass);
-        assert(mask is FlatTypeMask);
+        FlatTypeMask flatMask = mask;
+        assert(flatMask.base == null
+               || flatMask.base.element != compiler.dynamicClass);
         int inListIndex = -1;
         bool covered = false;
 
@@ -84,17 +85,18 @@
     ClassElement secondElement = masks[1].base.element;
     Iterable<ClassElement> candidates =
         compiler.world.commonSupertypesOf(firstElement, secondElement);
+    bool unseenType = false;
     for (int i = 2; i < masks.length; i++) {
       ClassElement element = masks[i].base.element;
       Set<ClassElement> supertypes = compiler.world.supertypesOf(element);
       if (supertypes == null) {
-        candidates.clear();
+        unseenType = true;
         break;
       }
       candidates = candidates.where((e) => supertypes.contains(e));
     }
 
-    if (candidates.isEmpty) {
+    if (candidates.isEmpty || unseenType) {
       // TODO(kasperl): Get rid of this check. It can only happen when
       // at least one of the two base types is 'unseen'.
       return new TypeMask(compiler.objectClass.rawType,