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

Explicit type hints are not respected

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.3.0, 2.4.0-rc-1
    • 2.4.3
    • Static Type Checker
    • None

    Description

      @groovy.transform.CompileStatic
      class Example {
        static void main(String[] args) {
          Collections.<String>emptyList().get(0).toUpperCase()
        }
      }
      

      That fails to compile because it doesn't respect the <String> hint.

      Attachments

        Issue Links

          Activity

            People

              melix Cédric Champeau
              ldaley Luke Daley
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: