You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Eric Milles (Jira)" <ji...@apache.org> on 2021/12/05 22:44:00 UTC

[jira] [Assigned] (GROOVY-6097) Using super.propertyName gives a MissingMethodException when the property is a boolean and uses the "isPropertyName" naming convention.

     [ https://issues.apache.org/jira/browse/GROOVY-6097?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eric Milles reassigned GROOVY-6097:
-----------------------------------

    Assignee: Eric Milles

> Using super.propertyName gives a MissingMethodException when the property is a boolean and uses the "isPropertyName" naming convention.
> ---------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: GROOVY-6097
>                 URL: https://issues.apache.org/jira/browse/GROOVY-6097
>             Project: Groovy
>          Issue Type: Bug
>          Components: groovy-jdk
>    Affects Versions: 2.1.3
>         Environment: Windows 7, Java 1.6, Groovy 2.1.3
>            Reporter: Brett Borchardt
>            Assignee: Eric Milles
>            Priority: Major
>         Attachments: MyClass.groovy
>
>
> See the following code:
> {code:title=MyClass.groovy}
> class MyClass extends MySuperClass {
>     public static void main(String[] args) {
>         new MyClass()
>     }
>     MyClass() {
>         println booleanProp // prints true
>         println this.booleanProp // prints true
>         println super.booleanProp // MissingMethodException
>     }
> }
> class MySuperClass {
>     boolean booleanProp
>     boolean isBooleanProp() {
>         return true
>     }
> }
> {code}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)