Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
3.0.1
-
None
Description
Seems like a regression in GString placeholder parsing:
Groovy 2.5.9: executing String s in groovyConsole gives => null
Groovy 3.0.1: executing String s 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 "${String s}" in groovyConsole gives => null
Groovy 3.0.1: executing "${String s}" in groovyConsole gives => groovy.lang.MissingPropertyException: No such property: s for class
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'