Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(184)

Unified Diff: compiler/java/com/google/dart/compiler/resolver/CoreTypeProviderImplementation.java

Issue 10869060: Infer type of List and Map literals (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | compiler/java/com/google/dart/compiler/type/TypeAnalyzer.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: compiler/java/com/google/dart/compiler/resolver/CoreTypeProviderImplementation.java
diff --git a/compiler/java/com/google/dart/compiler/resolver/CoreTypeProviderImplementation.java b/compiler/java/com/google/dart/compiler/resolver/CoreTypeProviderImplementation.java
index 604c8e159230c5b16f6ebf3110b8aa29f2832078..72a0330ebbce256043aec707191f1c321fe3a4c4 100644
--- a/compiler/java/com/google/dart/compiler/resolver/CoreTypeProviderImplementation.java
+++ b/compiler/java/com/google/dart/compiler/resolver/CoreTypeProviderImplementation.java
@@ -117,8 +117,7 @@ public class CoreTypeProviderImplementation implements CoreTypeProvider {
@Override
public InterfaceType getArrayLiteralType(Type elementType) {
- return objectArrayType.subst(
- Arrays.asList(elementType), objectArrayType.getElement().getTypeParameters());
+ return getArrayType(elementType);
}
@Override
@@ -148,8 +147,7 @@ public class CoreTypeProviderImplementation implements CoreTypeProvider {
@Override
public InterfaceType getMapLiteralType(Type key, Type value) {
- return mapLiteralType.subst(
- Arrays.asList(key, value), mapLiteralType.getElement().getTypeParameters());
+ return getMapType(key, value);
}
@Override
« no previous file with comments | « no previous file | compiler/java/com/google/dart/compiler/type/TypeAnalyzer.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698