| Index: compiler/java/com/google/dart/compiler/type/TypeAnalyzer.java
|
| diff --git a/compiler/java/com/google/dart/compiler/type/TypeAnalyzer.java b/compiler/java/com/google/dart/compiler/type/TypeAnalyzer.java
|
| index 35cda0e7ae6b7ccdd29f6d9bee75e6f2de8d9a20..a53b106bcdbb09036a6a6816e2175bc331461463 100644
|
| --- a/compiler/java/com/google/dart/compiler/type/TypeAnalyzer.java
|
| +++ b/compiler/java/com/google/dart/compiler/type/TypeAnalyzer.java
|
| @@ -163,7 +163,6 @@ public class TypeAnalyzer implements DartCompilationPhase {
|
|
|
| @VisibleForTesting
|
| static class Analyzer extends ASTVisitor<Type> {
|
| - private final CoreTypeProvider typeProvider;
|
| private final DynamicType dynamicType;
|
| private final Type stringType;
|
| private final InterfaceType defaultLiteralMapType;
|
| @@ -200,7 +199,6 @@ public class TypeAnalyzer implements DartCompilationPhase {
|
| Analyzer(DartCompilerContext context, CoreTypeProvider typeProvider,
|
| Set<ClassElement> diagnosedAbstractClasses) {
|
| this.context = context;
|
| - this.typeProvider = typeProvider;
|
| this.developerModeChecks = context.getCompilerConfiguration().developerModeChecks();
|
| this.types = Types.getInstance(typeProvider);
|
| this.dynamicType = typeProvider.getDynamicType();
|
| @@ -1851,24 +1849,6 @@ public class TypeAnalyzer implements DartCompilationPhase {
|
| }
|
| }
|
|
|
| - // infer type of constant literal
|
| - if (node.isConst() && node.getTypeArguments().isEmpty()) {
|
| - List<Type> valueTypes = Lists.newArrayList();
|
| - for (DartMapLiteralEntry literalEntry : node.getEntries()) {
|
| - DartExpression value = literalEntry.getValue();
|
| - if (value != null) {
|
| - Type valueType = typeOf(value);
|
| - if (valueType != null ) {
|
| - valueTypes.add(valueType);
|
| - }
|
| - }
|
| - }
|
| - Type valueType = types.intersection(valueTypes);
|
| - valueType = Types.makeInferred(valueType);
|
| - InterfaceType mapLiteralType = typeProvider.getMapLiteralType(stringType, valueType);
|
| - return Types.makeInferred(mapLiteralType);
|
| - }
|
| -
|
| return type;
|
| }
|
|
|
| @@ -2705,21 +2685,6 @@ public class TypeAnalyzer implements DartCompilationPhase {
|
| }
|
| }
|
| }
|
| - // infer type of constant literal
|
| - if (node.isConst() && node.getTypeArguments().isEmpty()) {
|
| - List<Type> elementTypes = Lists.newArrayList();
|
| - for (DartExpression expression : node.getExpressions()) {
|
| - Type elementType = expression.getType();
|
| - if (elementType != null ) {
|
| - elementTypes.add(elementType);
|
| - }
|
| - }
|
| - Type elementType = types.intersection(elementTypes);
|
| - elementType = Types.makeInferred(elementType);
|
| - InterfaceType arrayLiteralType = typeProvider.getArrayLiteralType(elementType);
|
| - return Types.makeInferred(arrayLiteralType);
|
| - }
|
| - // done
|
| return interfaceType;
|
| }
|
|
|
|
|