You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Paul King (JIRA)" <ji...@apache.org> on 2017/05/02 02:03:09 UTC

[jira] [Closed] (GROOVY-4762) Numbers as properties in command expressions

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

Paul King closed GROOVY-4762.
-----------------------------

> Numbers as properties in command expressions
> --------------------------------------------
>
>                 Key: GROOVY-4762
>                 URL: https://issues.apache.org/jira/browse/GROOVY-4762
>             Project: Groovy
>          Issue Type: Bug
>          Components: parser
>    Affects Versions: 1.8-rc-3
>            Reporter: Maxim Medvedev
>            Assignee: Daniel Sun
>             Fix For: 3.0
>
>
> It is allowed not to surround numbers with quotes in command expressions if they are used as properties.
> Is it bug or feature?
>  
> {code}
> def get123() {2}
> def foo(i) {this}
> def a = foo(2).'123'
> def b = foo 2   123
> println a
> println b
> {code}
> But if you rename get123() to get123a() the line will throw an exception.
> {code}
> def b = foo 2   123a
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)