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

VerifyError when using double instead of Double

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.1-beta-1
    • 1.1-beta-2
    • None
    • None
    • Windows XP, Java 1.6.0_02, Groovy 1.1-BETA-2-SNAPSHOT

    Description

      The following unit test:

      class VEBug extends GroovyTestCase {
      static void caller(double start, Integer numIter) {
      numIter.times

      { assertEquals(20d, VEBug.foo(start)) }

      }

      static double foo(double x)

      { return x*10 }

      void testCaller()

      { caller(2.0d, 5) }

      }

      fails with "Caught: java.lang.VerifyError: (class: VEBug, method: caller signature: (DLjava/lang/Integer;)V) Register 1 contains wrong type"

      If you change the first parameter of caller to be type Double instead of double, it works fine.

      Attachments

        Activity

          People

            blackdrag Jochen Theodorou
            mcspanky Martin C. Martin
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: