From f35ca2b2873addb5797e7a443eb9451a322a1670 Mon Sep 17 00:00:00 2001 From: Eric Milles Date: Sun, 5 Dec 2021 09:42:18 -0600 Subject: [PATCH] GROOVY-9851 --- .../core/tests/basic/GroovySimpleTests.java | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/base-test/org.eclipse.jdt.groovy.core.tests.compiler/src/org/eclipse/jdt/groovy/core/tests/basic/GroovySimpleTests.java b/base-test/org.eclipse.jdt.groovy.core.tests.compiler/src/org/eclipse/jdt/groovy/core/tests/basic/GroovySimpleTests.java index b8c01d81e2..410c789c83 100644 --- a/base-test/org.eclipse.jdt.groovy.core.tests.compiler/src/org/eclipse/jdt/groovy/core/tests/basic/GroovySimpleTests.java +++ b/base-test/org.eclipse.jdt.groovy.core.tests.compiler/src/org/eclipse/jdt/groovy/core/tests/basic/GroovySimpleTests.java @@ -6521,6 +6521,28 @@ public void testInvokingVarargsCtors01_GtoJ() { runConformTest(sources, "012012"); } + @Test // GROOVY-9851 + public void testSuperDotPrivateMethod() { + //@formatter:off + String[] sources = { + "Main.groovy", + "abstract class A {\n" + + " private void m() {\n" + + " print 'works'\n" + + " }\n" + + "}\n" + + "class C extends A {\n" + + " void test() {\n" + + " super.m()\n" + // private method! + " }\n" + + "}\n" + + "new C().test()\n", + }; + //@formatter:on + + runConformTest(sources, "works"); + } + @Test public void testPositions1() { //@formatter:off