You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by em...@apache.org on 2021/03/16 20:02:58 UTC
[groovy] branch master updated: GROOVY-8104: add test case
This is an automated email from the ASF dual-hosted git repository.
emilles pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/groovy.git
The following commit(s) were added to refs/heads/master by this push:
new 8a4bcf7 GROOVY-8104: add test case
8a4bcf7 is described below
commit 8a4bcf70b062795daf392af78094d1420de87435
Author: Eric Milles <er...@thomsonreuters.com>
AuthorDate: Tue Mar 16 14:32:45 2021 -0500
GROOVY-8104: add test case
---
src/test/gls/innerClass/InnerClassTest.groovy | 37 ++++++++++++++++++++++++++-
1 file changed, 36 insertions(+), 1 deletion(-)
diff --git a/src/test/gls/innerClass/InnerClassTest.groovy b/src/test/gls/innerClass/InnerClassTest.groovy
index fe6a886..e8436f7 100644
--- a/src/test/gls/innerClass/InnerClassTest.groovy
+++ b/src/test/gls/innerClass/InnerClassTest.groovy
@@ -322,6 +322,41 @@ final class InnerClassTest {
'''
}
+ @Test @NotYetImplemented // GROOVY-8104
+ void testNonStaticInnerClass4() {
+ assertScript '''
+ class A {
+ void foo() {
+ C c = new C()
+ ['1','2','3'].each { obj ->
+ c.baz(obj, new I() {
+ @Override
+ void bar(Object o) {
+ B b = new B() // Could not find matching constructor for: A$B(A$_foo_closure1)
+ }
+ })
+ }
+ }
+
+ class B {
+ }
+ }
+
+ class C {
+ void baz(Object o, I i) {
+ i.bar(o)
+ }
+ }
+
+ interface I {
+ void bar(Object o)
+ }
+
+ A a = new A()
+ a.foo()
+ '''
+ }
+
@Test
void testAnonymousInnerClass() {
assertScript '''
@@ -1394,7 +1429,7 @@ final class InnerClassTest {
}
@org.junit.Ignore @Test // GROOVY-9866
- void testResolveInnerTypeOfSuperType11() {
+ void testResolveInnerOfSuperType12() {
assertScript '''
class X { // System
interface Y { // Logger