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

Exception thrown when assigning value to variable outside closure

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0-beta-5
    • 1.0-beta-5
    • None
    • None
    • Windows 2000, Latest build frmo CVS at time of raising bug

    Description

      def isInRange(value)
      {
      range = 0..3
      result = false
      range.each

      {e| if(e == value) result = true}

      return result
      }

      println isInRange(3)
      println isInRange(4)
      ------------

      Throws this exception:

      Exception in thread "main" java.lang.VerifyError: (class: bug$1, method: doCall signature: (Ljava/lang/Object;)Ljava/lang/Object Inconsistent stack height 1 != 0

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              roblally Rob Lally
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: