Groovy
  1. Groovy
  2. GROOVY-4886

Nested with statements do not access global class variables

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor 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

        Activity

        No work has yet been logged on this issue.

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development