Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-8641

Cannot qualify path expression with soft keyword (exclude "def" for now)

    XMLWordPrintableJSON

Details

    Description

      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:

      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
      }
      

      Attachments

        Issue Links

          Activity

            People

              daniel_sun Daniel Sun
              daniilo Daniil Ovchinnikov
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: