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

Class with @CompileStatic throws VerifyError when passing int constant to method taking varargs object array

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.1.3
    • 2.1.4
    • Static compilation
    • None
    • Windows 7, Java 6, 64-bit, Groovy 2.1.3

    Description

      Run this code to reproduce the error:

      @groovy.transform.CompileStatic
      class MyClass {
      
          static void main(String[] args) {
              printObjects(MyConstants.MY_CONSTANT)
          }
      
          private static void printObjects(Object... objects) {
              for(Object o : objects) {
                  println o
              }
          }
      }
      
      class MyConstants {
          public static final int MY_CONSTANT = 1
      }
      

      Attachments

        Activity

          People

            melix Cédric Champeau
            bborchardt Brett Borchardt
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: