| 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 3f05faadfe9d17889841a8bfd91d53a1cf76bc68..aaddf2e5d61c88ba52345e3248b655a76a77b45c 100644
|
| --- a/compiler/javatests/com/google/dart/compiler/end2end/inc/IncrementalCompilation2Test.java
|
| +++ b/compiler/javatests/com/google/dart/compiler/end2end/inc/IncrementalCompilation2Test.java
|
| @@ -750,13 +750,47 @@ public class IncrementalCompilation2Test extends CompilerTestCase {
|
| " }",
|
| "}",
|
| ""));
|
| - // do compile, no errors expected
|
| + // do compile, check errors
|
| compile();
|
| assertErrors(
|
| errors,
|
| errEx(ResolverErrorCode.CANNOT_ACCESS_METHOD, 6, 5, 7),
|
| errEx(ResolverErrorCode.CANNOT_ACCESS_METHOD, 9, 11, 7));
|
| }
|
| +
|
| + /**
|
| + * When we resolve factory constructors, we should check if "lib" is library prefix, it is not
|
| + * always have to be name of type.
|
| + * <p>
|
| + * http://code.google.com/p/dart/issues/detail?id=2478
|
| + */
|
| + public void test_factoryClass_fromPrefixImportedLibrary() throws Exception {
|
| + appSource.setContent(
|
| + "A.dart",
|
| + makeCode(
|
| + "// filler filler filler filler filler filler filler filler filler filler filler",
|
| + "#library('A');",
|
| + "#import('" + APP + "');",
|
| + "interface I default A {",
|
| + " I();",
|
| + " I.named();",
|
| + "}",
|
| + ""));
|
| + appSource.setContent(
|
| + APP,
|
| + makeCode(
|
| + "// filler filler filler filler filler filler filler filler filler filler filler",
|
| + "#library('application');",
|
| + "#import('A.dart', prefix: 'lib');",
|
| + "class A {",
|
| + " factory lib.I() {}",
|
| + " factory lib.I.named() {}",
|
| + "}",
|
| + ""));
|
| + // do compile, no errors expected
|
| + compile();
|
| + assertErrors(errors);
|
| + }
|
|
|
| /**
|
| * <p>
|
|
|