Groovy
  1. Groovy
  2. GROOVY-704

Primitive function arguments cause VerifyError

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.0-beta-9
    • Fix Version/s: 1.0-beta-10
    • Component/s: None
    • Labels:
      None
    • Environment:
      Windows XP, Java 1.4.2_06

      Description

      The following code:

      def foo(double x, y) {
      println "x: "+x
      println "y: "+y
      }

      foo(10.0d, 0)

      causes Groovy to complain that the value passed to y is the wrong type. Making foo a member function of a class (in another file), and giving it three arguments, the function runs but y is null and the value that should go to y, goes to the third arg. At one point I had it triggering an internal error in the JVM.

      Changing double to Double fixes the problem.

      1. AsmClassGenerator2.diff
        0.8 kB
        Martin C. Martin

        Issue Links

          Activity

          No work has yet been logged on this issue.

            People

            • Assignee:
              Unassigned
              Reporter:
              Martin C. Martin
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development