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

@CompileStatic fails on valid generic type argument

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.2.1
    • 2.2.2
    • Compiler
    • None

    Description

      The following code (using Jackson API)

      TypeReference<Map<String, String>> mapTypeReference = new TypeReference<Map<String, String>>() {};

      fails to compile with @CompileStatic with

      [Static type checking] - Cannot use diamond <> with anonymous inner classes

      Even though it is valid Java code and should work in Groovy.

      Attachments

        Activity

          People

            melix Cédric Champeau
            axel.fontaine Axel Fontaine
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: