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

Expecting to find object/array on stack

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.5.5, 1.6, 1.6.4, 1.6.5
    • Fix Version/s: 1.6.6, 1.7-rc-1
    • Component/s: None
    • Labels:
      None

      Description

      Repro:
      Compile and run the following:

      class Test
      {
              String string
              URI[] uris
      
              public Test(String string, URI[] uris)
              {
                      this.string = string
                      this.uris = uris
              }
      
              public Test(String string, List uris)
              {
                      this(string, uris.collect { new URI(it) } as URI[])
              }
      
              public static void main(String[] args)
              {
                      def test = new Test('hello', ["world"])
                      println test.string
                      println test.strings
              }
      }

      Observed Result:

      $ groovyc Test.groovy
      $ groovy Test
      Caught: java.lang.VerifyError: (class: Test, method: <init> signature: (Ljava/lang/String;Ljava/util/List;)V) Expecting to find object/array on stack

      Expected Result:

      hello
      [world]
      

        Attachments

        1. Test.groovy
          0.4 kB
          sukhyun.cho

          Activity

            People

            • Assignee:
              roshandawrani Roshan Dawrani
              Reporter:
              sukhyun.cho sukhyun.cho
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: