Index: compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java |
diff --git a/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java b/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java |
index ce35c48c953e2fe1948bb5e7d1d6380174de5edb..6fc6188ba65564214c666af0727dfa500e61a99a 100644 |
--- a/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java |
+++ b/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java |
@@ -828,4 +828,13 @@ public class TypeAnalyzerCompilerTest extends CompilerTestCase { |
}); |
return errors; |
} |
+ |
+ public void test_mapLiteralKeysUnique() throws Exception { |
+ List<DartCompilationError> errors = |
+ analyzeLibrarySourceErrors(makeCode( |
+ "// filler filler filler filler filler filler filler filler filler filler", |
+ "var m = {'a' : 0, 'b': 1, 'a': 2};", |
+ "")); |
+ assertErrors(errors, errEx(TypeErrorCode.MAP_LITERAL_KEY_UNIQUE, 2, 27, 3)); |
+ } |
} |