groovy-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul King (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (GROOVY-4762) Numbers as properties in command expressions
Date Tue, 02 May 2017 02:03:09 GMT

     [ 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)

Mime
View raw message