| Index: compiler/javatests/com/google/dart/compiler/end2end/inc/IncrementalCompilation2Test.java
|
| diff --git a/compiler/javatests/com/google/dart/compiler/end2end/inc/IncrementalCompilation2Test.java b/compiler/javatests/com/google/dart/compiler/end2end/inc/IncrementalCompilation2Test.java
|
| index a27ba5747a3d0279b8ce29898484419d07fc0a32..ca59e475cdcb0964c701831d4d9784ae4129e6c3 100644
|
| --- a/compiler/javatests/com/google/dart/compiler/end2end/inc/IncrementalCompilation2Test.java
|
| +++ b/compiler/javatests/com/google/dart/compiler/end2end/inc/IncrementalCompilation2Test.java
|
| @@ -734,7 +734,7 @@ public class IncrementalCompilation2Test extends CompilerTestCase {
|
| errEx(ResolverErrorCode.CANNOT_ACCESS_METHOD, 6, 5, 9),
|
| errEx(ResolverErrorCode.CANNOT_ACCESS_METHOD, 9, 5, 15));
|
| }
|
| -
|
| +
|
| /**
|
| * <p>
|
| * http://code.google.com/p/dart/issues/detail?id=3340
|
| @@ -760,6 +760,48 @@ public class IncrementalCompilation2Test extends CompilerTestCase {
|
| compile();
|
| assertErrors(errors, errEx(ResolverErrorCode.CANNOT_HIDE_IMPORT_PREFIX, 5, 7, 3));
|
| }
|
| +
|
| + /**
|
| + * <p>
|
| + * http://code.google.com/p/dart/issues/detail?id=3531
|
| + */
|
| + public void test_builtInIdentifier_asTypeAnnotation() throws Exception {
|
| + appSource.setContent(
|
| + "A.dart",
|
| + makeCode(
|
| + "// filler filler filler filler filler filler filler filler filler filler filler",
|
| + "#library('A');",
|
| + ""));
|
| + appSource.setContent(
|
| + APP,
|
| + makeCode(
|
| + "// filler filler filler filler filler filler filler filler filler filler filler",
|
| + "#library('application');",
|
| + "#import('A.dart', prefix: 'abstract');",
|
| + "#import('A.dart', prefix: 'as');",
|
| + "#import('A.dart', prefix: 'assert');",
|
| + "#import('A.dart', prefix: 'Dynamic');",
|
| + "#import('A.dart', prefix: 'equals');",
|
| + "#import('A.dart', prefix: 'factory');",
|
| + "#import('A.dart', prefix: 'get');",
|
| + "#import('A.dart', prefix: 'implements');",
|
| + "#import('A.dart', prefix: 'interface');",
|
| + "#import('A.dart', prefix: 'negate');",
|
| + "#import('A.dart', prefix: 'operator');",
|
| + "#import('A.dart', prefix: 'set');",
|
| + "#import('A.dart', prefix: 'static');",
|
| + "#import('A.dart', prefix: 'typedef');",
|
| + "main() {",
|
| + " var prf;",
|
| + "}",
|
| + ""));
|
| + // do compile, no errors expected
|
| + compile();
|
| + assertEquals(14, errors.size());
|
| + for (DartCompilationError error : errors) {
|
| + assertEquals(ResolverErrorCode.BUILT_IN_IDENTIFIER_AS_IMPORT_PREFIX, error.getErrorCode());
|
| + }
|
| + }
|
|
|
| private void assertAppBuilt() {
|
| didWrite(APP, EXTENSION_DEPS);
|
|
|