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

Nested with statements do not access global class variables

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Not A Problem
    • Affects Version/s: 1.7.8
    • Fix Version/s: None
    • Component/s: parser
    • Labels:

      Description

      Nested with statements do not seem to recognize global (or super) parameters:

      class A {
      def foo = 123
      def controller = [params: [bar: 1]]
      def test() {
      controller.with {
      params.with

      { bar = foo }

      }
      controller.params.bar
      }
      }

      def a = new A()
      assertEquals 123, a.test()//Fails

        Attachments

          Activity

            People

            • Assignee:
              blackdrag Jochen Theodorou
              Reporter:
              ishults ishults
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: