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

@CompileStatic fails on valid generic type argument

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.1
    • Fix Version/s: 2.2.2
    • Component/s: Compiler
    • Labels:
      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

            • Assignee:
              melix C├ędric Champeau
              Reporter:
              axel.fontaine Axel Fontaine
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: