Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephan Herrmann2012-12-04 18:35:02 +0000
committerStephan Herrmann2012-12-04 18:35:02 +0000
commitc04f8c8f4092d12399b0a05fbe5e54234a584571 (patch)
treefbf52ae319ef6d8da1f5c9db4eb18239b2d67965 /testplugins
parentbea1ae76d13cfcaf3432e7c808b690afd557859c (diff)
downloadorg.eclipse.objectteams-c04f8c8f4092d12399b0a05fbe5e54234a584571.tar.gz
org.eclipse.objectteams-c04f8c8f4092d12399b0a05fbe5e54234a584571.tar.xz
org.eclipse.objectteams-c04f8c8f4092d12399b0a05fbe5e54234a584571.zip
Bug 395746 - [compiler] role of static inner of an inaccessible outer
cannot resolve base methods
Diffstat (limited to 'testplugins')
-rw-r--r--testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/roleplaying/PlayedByRelation.java24
1 files changed, 24 insertions, 0 deletions
diff --git a/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/roleplaying/PlayedByRelation.java b/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/roleplaying/PlayedByRelation.java
index 65dffda08..d9f359c9a 100644
--- a/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/roleplaying/PlayedByRelation.java
+++ b/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/roleplaying/PlayedByRelation.java
@@ -2643,4 +2643,28 @@ public class PlayedByRelation extends AbstractOTJLDTest {
"}\n"
});
}
+
+ // access to private static inner of an inaccessible outer via playedBy
+ public void test2125_roleOfNestedClass1() {
+ runConformTest(
+ new String[] {
+ "p2125/base/T2125ronc1.java",
+ "package p2125.base;\n" +
+ "class T2125ronc1 {\n" +
+ " private static class Inner {\n" +
+ " void foo() {}\n" +
+ " }\n" +
+ " void bar(Inner i) { i.foo(); }\n" +
+ "}\n",
+ "p2125/teams/Team2125ronc1.java",
+ "package p2125.teams;\n" +
+ "import base p2125.base.T2125ronc1.Inner;\n" +
+ "@SuppressWarnings(\"decapsulation\")\n" +
+ "public team class Team2125ronc1 {\n" +
+ " protected class R playedBy Inner {\n" +
+ " void foo() -> void foo();\n" +
+ " }\n" +
+ "}\n"
+ });
+ }
}

Back to the top