[ 
https://issues.apache.org/jira/browse/GROOVY-11667?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17952287#comment-17952287
 ] 

ASF GitHub Bot commented on GROOVY-11667:
-----------------------------------------

eric-milles opened a new pull request, #2226:
URL: https://github.com/apache/groovy/pull/2226

   inner class dispatch is slightly different to support outer class member 
access




> GPathResult and attribute syntax within inner class
> ---------------------------------------------------
>
>                 Key: GROOVY-11667
>                 URL: https://issues.apache.org/jira/browse/GROOVY-11667
>             Project: Groovy
>          Issue Type: Bug
>            Reporter: Eric Milles
>            Assignee: Eric Milles
>            Priority: Major
>
> This came in through the mailing list.
> {code:java}
>     @Test
>     void testAttribute() {
>         def xml = '''
>             <person>
>                 <name>John Doe</name>
>             </person>
>         '''
>         def path = getRoot(xml)
>         def text = pa...@id.text() ?: null
>         assert text == null
>         assert new Inner(path).@id == null
>     }
>     static class Inner {
>         protected id
>         Inner(GPathResult gpath) {
>             this.@id = gpa...@id.text() ?: null
>         }
>     }
> {code}
> The problem has to do with the overloads of getAttribute and setAttribute.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to