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

VerifyError: returning local variable outside of scope

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.0-JSR-3
    • 1.0-JSR-5
    • None
    • None

    Description

      test()

      def test() {
      try

      { def y = 1; }

      catch (NullPointerException ex) {
      }

      return y;
      }

      java.lang.VerifyError: (class: testScript, method: test signature: ()Ljava/lang/Object Accessing value from uninitialized register 3
      at java.lang.Class.getDeclaredConstructors0(Native Method)
      at java.lang.Class.privateGetDeclaredConstructors(Class.java:2328)
      at java.lang.Class.getConstructor0(Class.java:2640)
      at java.lang.Class.newInstance0(Class.java:321)
      at java.lang.Class.newInstance(Class.java:303)
      at org.codehaus.groovy.runtime.InvokerHelper.createScript(InvokerHelper.java:517)

      Attachments

        Issue Links

          Activity

            People

              blackdrag Jochen Theodorou
              igorin Igor Nuzhnov
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: