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

Groovy not checking generics information correctly for covariant methods implementing interfaces

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.1.6, 2.2.0-beta-1
    • Fix Version/s: 2.3.0-beta-1
    • Component/s: Compiler
    • Labels:
      None

      Description

      For this class:

      class StringIterator implements Iterator<String> {
        void remove() { }
        boolean hasNext() { false }
        def next() { 3 }
      }
      

      The compiler should complain that next doesn't have return type String.

        Attachments

          Activity

            People

            • Assignee:
              paulk Paul King
              Reporter:
              paulk Paul King
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: