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

Number conversion from BigDecimal to double does not work for Varargs

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.1-beta-1
    • 1.1-beta-2
    • None
    • None
    • Debian GNU/Linux is version 4.0r0, codenamed etch
      Groovy Version: 1.1-BETA-1 JVM: 1.6.0-b105

    Description

      Number conversion from BigDecimal to double does not work for Varargs

      Varargs are explained in
      http://java.sun.com/j2se/1.5.0/docs/guide/language/varargs.html

      Code Example:

      // C.java
      public class C {
      public static void m(double... d) { }
      }

      // T.groovy
      C.m(0.5, 0.5)

      Error:
      Caught: java.lang.IllegalArgumentException: argument type mismatch
      at T.run(T.groovy:2)
      at T.main(T.groovy)

      Attachments

        Activity

          People

            blackdrag Jochen Theodorou
            artificialidea Ivan F. Villanueva B.
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: