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

No warning for type parameter that hides a type

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • None
    • None

    Description

      Consider the following:

      class Type<T> {
        def <T> m(T t) {
        }
      }
      

      In this case, I think it was an accident to add "<T>" to the method declaration.

      The method type parameter "T" hides the enclosing class type parameter "T" without warning. I think you could get the same situation with "class T" in the same package. ecj states "The type parameter T is hiding the type T".

      Attachments

        Activity

          People

            Unassigned Unassigned
            emilles Eric Milles
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: