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

Nested with statements do not access global class variables

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Not A Problem
    • 1.7.8
    • None
    • parser

    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

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

            Dates

              Created:
              Updated:
              Resolved: