This is an automated email from the ASF dual-hosted git repository. paulk pushed a commit to branch GROOVY_3_0_X in repository https://gitbox.apache.org/repos/asf/groovy.git
commit 8205184bc278770de1b217044176a85883ab2a88 Author: Paul King <[email protected]> AuthorDate: Sat Jul 18 13:26:16 2020 +1000 GROOVY-9618: Property reference resolves to field, not getter when property name is single upper-case letter (additional test - closes #1316) --- src/test/groovy/PropertyTest.groovy | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/test/groovy/PropertyTest.groovy b/src/test/groovy/PropertyTest.groovy index 4f49395..a9f55f7 100644 --- a/src/test/groovy/PropertyTest.groovy +++ b/src/test/groovy/PropertyTest.groovy @@ -557,6 +557,22 @@ class PropertyTest extends GroovyTestCase { assert Pi.toString().startsWith('3') ''' } + + void testPropertyAndStaticUppercaseFieldPriority() { // GROOVY-9618 + assertScript ''' + class A { + public static X = 1 + static getX() { 2 } + static class B { } + } + class C extends A.B { + def test() { + X + } + } + assert new C().test() == 2 + ''' + } } class Base {
