Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorssankaran2014-09-02 09:40:37 +0000
committerssankaran2014-09-02 09:40:37 +0000
commitc00079358eb2e0feded1f86b5088b09215957a9d (patch)
tree521b3dc5af310d93a0bcdbf96f570960000f1231 /org.eclipse.jdt.core.tests.builder
parent9c3c9a68123a2dba6c0a481afee1d6f36fcdd02a (diff)
downloadeclipse.jdt.core-c00079358eb2e0feded1f86b5088b09215957a9d.tar.gz
eclipse.jdt.core-c00079358eb2e0feded1f86b5088b09215957a9d.tar.xz
eclipse.jdt.core-c00079358eb2e0feded1f86b5088b09215957a9d.zip
Fixed Bug 438923 - [compiler]Type is inappropriately consideredI20140902-1330I20140902-0800
"indirectly referenced"
Diffstat (limited to 'org.eclipse.jdt.core.tests.builder')
-rw-r--r--org.eclipse.jdt.core.tests.builder/src/org/eclipse/jdt/core/tests/builder/MultiProjectTests.java64
1 files changed, 63 insertions, 1 deletions
diff --git a/org.eclipse.jdt.core.tests.builder/src/org/eclipse/jdt/core/tests/builder/MultiProjectTests.java b/org.eclipse.jdt.core.tests.builder/src/org/eclipse/jdt/core/tests/builder/MultiProjectTests.java
index 5df2545281..ea27944383 100644
--- a/org.eclipse.jdt.core.tests.builder/src/org/eclipse/jdt/core/tests/builder/MultiProjectTests.java
+++ b/org.eclipse.jdt.core.tests.builder/src/org/eclipse/jdt/core/tests/builder/MultiProjectTests.java
@@ -30,7 +30,7 @@ public class MultiProjectTests extends BuilderTests {
public MultiProjectTests(String name) {
super(name);
}
-
+
public static Test suite() {
TestSuite suite = new TestSuite(MultiProjectTests.class.getName());
suite.addTest(new MultiProjectTests("testCompileOnlyDependent"));
@@ -57,6 +57,7 @@ public class MultiProjectTests extends BuilderTests {
suite.addTest(new MultiProjectTests("test101_class_folder_non_exported"));
suite.addTest(new MultiProjectTests("test102_missing_required_binaries"));
suite.addTest(new MultiProjectTests("test103_missing_required_binaries"));
+ suite.addTest(new MultiProjectTests("test438923"));
return suite;
}
@@ -1606,4 +1607,65 @@ public void test103_missing_required_binaries() throws JavaModelException {
env.setBuildOrder(null);
}
}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=438923, [compiler]Type is inappropriately considered "indirectly referenced"
+public void test438923() throws JavaModelException {
+ //----------------------------
+ // Project1
+ //----------------------------
+ IPath p1 = env.addProject("P1"); //$NON-NLS-1$
+ env.addExternalJars(p1, Util.getJavaClassLibs());
+ // remove old package fragment root so that names don't collide
+ env.removePackageFragmentRoot(p1, ""); //$NON-NLS-1$
+ IPath root1 = env.addPackageFragmentRoot(p1, "src"); //$NON-NLS-1$
+ env.setOutputFolder(p1, "bin"); //$NON-NLS-1$
+
+ env.addClass(root1, "p1", "P1I0", //$NON-NLS-1$ //$NON-NLS-2$
+ "package p1;\n" +
+ "public interface P1I0 {\n" +
+ " interface II {/*empty*/}\n" +
+ "}\n"
+ );
+
+ //----------------------------
+ // Project2
+ //----------------------------
+ IPath p2 = env.addProject("P2"); //$NON-NLS-1$
+ env.addExternalJars(p2, Util.getJavaClassLibs());
+ // remove old package fragment root so that names don't collide
+ env.removePackageFragmentRoot(p2, ""); //$NON-NLS-1$
+ IPath root2 = env.addPackageFragmentRoot(p2, "src"); //$NON-NLS-1$
+ env.setOutputFolder(p2, "bin"); //$NON-NLS-1$
+
+ env.addClass(root2, "p2", "P2C0", //$NON-NLS-1$ //$NON-NLS-2$
+ "package p2;\n" +
+ "import p1.P1I0;\n" +
+ "public class P2C0 {\n" +
+ " public void z(final P1I0.II [] ii) {/*empty*/}\n" +
+ "}\n"
+ );
+
+ //----------------------------
+ // Project3
+ //----------------------------
+ IPath p3 = env.addProject("P3"); //$NON-NLS-1$
+ env.addExternalJars(p3, Util.getJavaClassLibs());
+ // remove old package fragment root so that names don't collide
+ env.removePackageFragmentRoot(p3, ""); //$NON-NLS-1$
+ IPath root3 = env.addPackageFragmentRoot(p3, "src"); //$NON-NLS-1$
+ env.setOutputFolder(p3, "bin"); //$NON-NLS-1$
+
+ env.addClass(root3, "p3", "P3C0", //$NON-NLS-1$ //$NON-NLS-2$
+ "package p3;\n" +
+ "import p2.P2C0;\n" +
+ "public class P3C0\n" +
+ " extends P2C0 {/*empty*/}\n"
+ );
+
+ // for Project1
+ env.addRequiredProject(p2, p1);
+ env.addRequiredProject(p3, p2);
+
+ fullBuild();
+ expectingNoProblems();
+}
}

Back to the top