You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Jochen Kemnade (JIRA)" <ji...@apache.org> on 2017/01/25 07:38:26 UTC

[jira] [Updated] (GROOVY-8064) Confusing error message when trying to access a property which is actually a method

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

Jochen Kemnade updated GROOVY-8064:
-----------------------------------
    Summary: Confusing error message when trying to access a property which is actually a method  (was: Confusing error message when trying to access a property which is actually a function)

> Confusing error message when trying to access a property which is actually a method
> -----------------------------------------------------------------------------------
>
>                 Key: GROOVY-8064
>                 URL: https://issues.apache.org/jira/browse/GROOVY-8064
>             Project: Groovy
>          Issue Type: Improvement
>    Affects Versions: 2.4.8
>            Reporter: Jochen Kemnade
>            Priority: Minor
>
> {code}
> groovy:000> new File('/tmp').lastModified
> ERROR groovy.lang.MissingPropertyException:
> No such property: lastModified for class: java.io.File
> Possible solutions: lastModified
> {code}
> {{lastModified}} is actually a method, so I should have used {{new File('/tmp').lastModified()}}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)