Skip to content

Commit

Permalink
GROOVY-11301: add test case
Browse files Browse the repository at this point in the history
  • Loading branch information
eric-milles committed Feb 23, 2024
1 parent c91a8c4 commit dff1da5
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/test/groovy/transform/stc/MethodReferenceTest.groovy
Expand Up @@ -1441,4 +1441,20 @@ final class MethodReferenceTest {
assert bars.stream().map(Bar::name).map(String::toLowerCase).toList() == ['a', 'b']
'''
}

@Test // GROOVY-11301
void testInnerClassPrivateMethodReference() {
assertScript shell, '''
class C {
static class D {
private static String m() { 'D' }
}
@CompileStatic
static main(args) {
Supplier<String> str = D::m
assert str.get() == 'D'
}
}
'''
}
}

0 comments on commit dff1da5

Please sign in to comment.