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

Function with statically typed parameter generates bad bytecodes

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0-beta-3
    • 1.0-beta-4
    • class generator
    • None

    Description

      class C {
      test(int x)

      { return x }

      }

      generates bytecodes which fail validation:

      java.lang.VerifyError: (class: C, method: test signature: (I)Ljava/lang/Object Expecting to find object/array on stack

      Removintg the int declaration from the method declaration fixes the problem.

      It looks like code is generated which still expects an Object parameter rather than in int.

      Attachments

        Activity

          People

            jstrachan James Strachan
            tug John Wilson
            Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: