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

Paul King updated GROOVY-9427:
------------------------------
    Issue Type: Bug  (was: Task)

> Regression in GString handling
> ------------------------------
>
>                 Key: GROOVY-9427
>                 URL: https://issues.apache.org/jira/browse/GROOVY-9427
>             Project: Groovy
>          Issue Type: Bug
>          Components: parser-antlr4
>    Affects Versions: 3.0.1
>            Reporter: Paul King
>            Assignee: Daniel Sun
>            Priority: Major
>             Fix For: 4.0.0-alpha-1, 3.0.2
>
>
> Seems like a regression in GString placeholder parsing:
>  Groovy 2.5.9: executing {color:#4c9aff}{{String s}}{color} in groovyConsole 
> gives => null
>  Groovy 3.0.1: executing {color:#4c9aff}{{String s}}{color} in groovyConsole 
> gives => null
>  In both cases it is a declaration statement, type String, name s (all good 
> so far)
> Trying a GString containing the same expression yields:
>  Groovy 2.5.9: executing {color:#4c9aff}{{"${String s}"}}{color} in 
> groovyConsole gives => null
>  Groovy 3.0.1: executing {color:#4c9aff}{{"${String s}"}}{color} in 
> groovyConsole gives => {color:#de350b}groovy.lang.MissingPropertyException: 
> No such property: s for class{color}
> In 2.5.9, we have a GString with value being a closure exp containing the 
> decl exp as per previous example
>  In 3.0.1, we have a GString with value being a method call exp with name 
> 'java.lang.String' and arg 's'



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to