Issue 4719. Mark inferred List/Map literal types as inferred.

http://code.google.com/p/dart/issues/detail?id=4719

R=brianwilkerson@google.com
BUG=

Review URL: https://chromiumcodereview.appspot.com//10878088

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11441 260f80e4-7a28-3924-810f-c04153c831b5
This commit is contained in:
scheglov@google.com
2012-08-28 13:20:29 +00:00
parent 6ef7aa818d
commit 1217a48d2a
4 changed files with 27 additions and 6 deletions
@@ -1867,7 +1867,8 @@ public class TypeAnalyzer implements DartCompilationPhase {
}
Type valueType = types.intersection(valueTypes);
valueType = Types.makeInferred(valueType);
return typeProvider.getMapLiteralType(stringType, valueType);
InterfaceType mapLiteralType = typeProvider.getMapLiteralType(stringType, valueType);
return Types.makeInferred(mapLiteralType);
}
return type;
@@ -2717,7 +2718,8 @@ public class TypeAnalyzer implements DartCompilationPhase {
}
Type elementType = types.intersection(elementTypes);
elementType = Types.makeInferred(elementType);
return typeProvider.getArrayLiteralType(elementType);
InterfaceType arrayLiteralType = typeProvider.getArrayLiteralType(elementType);
return Types.makeInferred(arrayLiteralType);
}
// done
return interfaceType;