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

Unified Diff: compiler/java/com/google/dart/compiler/type/TypeAnalyzer.java

Issue 10836281: Issue 4523. Analyzer should require two type arguments for 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
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 c8185f1675e0f95fa4756cb04110eedc844268c4..ebe090119741f2ef77dc90309e3fa47635b44eb5 100644
--- a/compiler/java/com/google/dart/compiler/type/TypeAnalyzer.java
+++ b/compiler/java/com/google/dart/compiler/type/TypeAnalyzer.java
@@ -1709,7 +1709,7 @@ public class TypeAnalyzer implements DartCompilationPhase {
// The Map literal has an implicit key type of String, so only one parameter is
// specified <V> where V is the type of the value.
- checkAssignable(node, type, defaultLiteralMapType);
+ checkAssignable(node, defaultLiteralMapType, type);
// Check the map literal entries against the return type.
Type valueType = type.getArguments().get(1);

Powered by Google App Engine
This is Rietveld 408576698