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

Inferred generics parameter types could contain primitive types

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0-beta-1
    • 2.0-beta-2
    • Static Type Checker
    • None

    Description

      In some cases like Groovy classes extending Java classes, inferred generics parameter types could be primitives instead of boxed types:

      GroovyPage.java
      public class GroovyPage {
              public final void printHtmlPart(final int partNumber) {}
              public final void createTagBody(int bodyClosureIndex, Closure<?> bodyClosure) {}
          }
      
      Child.groovy
      class Child extends GroovyPage {
                      void foo() {
                          createTagBody(1) { ->
                              printHtmlPart(2)
                          }
                      }
                  }
      

      Attachments

        Activity

          People

            melix Cédric Champeau
            melix Cédric Champeau
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: