diff options
author | Stephan Herrmann | 2013-02-20 16:42:47 +0000 |
---|---|---|
committer | Stephan Herrmann | 2013-02-20 16:42:47 +0000 |
commit | 00b56bcf521015e6afc011172c68045a206f5ee6 (patch) | |
tree | 099b31b1da0cd6a4e3cd878a41f040af9616d479 /testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams | |
parent | 46b5d51c9d08356f7eef34466c9a9ba54bcb8050 (diff) | |
download | org.eclipse.objectteams-00b56bcf521015e6afc011172c68045a206f5ee6.tar.gz org.eclipse.objectteams-00b56bcf521015e6afc011172c68045a206f5ee6.tar.xz org.eclipse.objectteams-00b56bcf521015e6afc011172c68045a206f5ee6.zip |
bug 400833 - [compiler] resolve error re lifting constructor with
implicit playedBy refinement
Diffstat (limited to 'testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams')
-rw-r--r-- | testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/roleplaying/LiftingAndLowering.java | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/roleplaying/LiftingAndLowering.java b/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/roleplaying/LiftingAndLowering.java index d323f10a9..4bbe5226a 100644 --- a/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/roleplaying/LiftingAndLowering.java +++ b/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/roleplaying/LiftingAndLowering.java @@ -5495,4 +5495,53 @@ public class LiftingAndLowering extends AbstractOTJLDTest { "----------\n"); } + // [compiler] resolve error re lifting constructor with implicit playedBy refinement + public void testBug400833() { + runConformTest( + new String[] { + "to/TOuter.java", + "package to;\n" + + "\n" + + "\n" + + "import base tb.TB1;\n" + + "import base tb.TB2;\n" + + "\n" + + "public team class TOuter {\n" + + " public team class T1 playedBy TB1 {\n" + + " protected class R playedBy B<@base> { }\n" + + " /* added method */\n" + + " public void test() {\n" + + " new R(new B<@base>()); // works!\n" + + " }\n" + + " }\n" + + " public team class T2 extends T1 playedBy TB2 {\n" + + " @Override\n" + + " protected class R playedBy B<@base> { }\n" + + " @Override\n" + + " public void test() {\n" + + " new R(new B<@base>()); // error!\n" + + " }\n" + + " }\n" + + " void test(TB2 as T2 t2) {\n" + + " t2.test();\n" + + " }\n" + + " public static void main(String... args) {\n" + + " new TOuter().test(new tb.TB2());\n" + + " }\n" + + "}\n", + "tb/TB2.java", + "package tb;\n" + + "public team class TB2 extends TB1 {\n" + + " @Override public class B {\n" + + " public B() { System.out.print(\"OK\"); }\n" + + " }\n" + + "}\n", + "tb/TB1.java", + "package tb;\n" + + "public team class TB1 {\n" + + " public class B {}\n" + + "}\n", + }, + "OK"); + } } |