[jira] [Created] (GROOVY-8641) Cannot qualify path expression with soft keyword

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Created] (GROOVY-8641) Cannot qualify path expression with soft keyword

JIRA jira@apache.org
Daniil Ovchinnikov created GROOVY-8641:
------------------------------------------

             Summary: Cannot qualify path expression with soft keyword
                 Key: GROOVY-8641
                 URL: https://issues.apache.org/jira/browse/GROOVY-8641
             Project: Groovy
          Issue Type: Bug
          Components: parser
    Affects Versions: 3.0.0-alpha-2
            Reporter: Daniil Ovchinnikov


{{in.foo}} (and others) in valid path expression in Groovy < 3.0.
The following code is parsed and run properly in previous versions, but fails in 3.0:
{code}
def delegate = new Object() {
  def getProperty(String name) {
    println name
    return this
  }
}

delegate.with {
  in.foo // Unexpected input: 'delegate.with {\n  in.foo\n' @ line 9, column 9.
  def.foo
  trait.foo
  as.foo
}
{code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)