| 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 4dd715c30878698c4f9469dc93574d0006b2c359..76e1dc1c1c1ee133864968b5b3155f5c2e94dd4b 100644
|
| --- a/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java
|
| +++ b/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java
|
| @@ -27,6 +27,7 @@ import com.google.dart.compiler.ast.DartForInStatement;
|
| import com.google.dart.compiler.ast.DartFunctionExpression;
|
| import com.google.dart.compiler.ast.DartIdentifier;
|
| import com.google.dart.compiler.ast.DartInvocation;
|
| +import com.google.dart.compiler.ast.DartMapLiteralEntry;
|
| import com.google.dart.compiler.ast.DartMethodDefinition;
|
| import com.google.dart.compiler.ast.DartNewExpression;
|
| import com.google.dart.compiler.ast.DartNode;
|
| @@ -3030,6 +3031,22 @@ public class TypeAnalyzerCompilerTest extends CompilerTestCase {
|
|
|
| }
|
|
|
| + /**
|
| + * Missing value in {@link DartMapLiteralEntry} is parsing error, but should not cause exception.
|
| + * <p>
|
| + * http://code.google.com/p/dart/issues/detail?id=3931
|
| + */
|
| + public void test_mapLiteralEntry_noValue() throws Exception {
|
| + AnalyzeLibraryResult libraryResult = analyzeLibrary(
|
| + "// filler filler filler filler filler filler filler filler filler filler",
|
| + "main() {",
|
| + " var v = {'key' : /*no value*/};",
|
| + "}",
|
| + "");
|
| + // has some errors
|
| + assertTrue(libraryResult.getErrors().size() != 0);
|
| + }
|
| +
|
| private static <T extends DartNode> T findNode(
|
| AnalyzeLibraryResult libraryResult,
|
| final Class<T> clazz,
|
|
|