type parameter referenced in static inner class improperly allowed!

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P3
    • 5.0
    • Affects Version/s: 5.0
    • Component/s: tools
    • b54
    • generic
    • solaris_8

      The following should give an error: type parameters K and V aren't in scope
      in the extends clause of Bucket because Bucket is a static nested class. Yet
      the compiler allows it.



      import java.util.*;

      class MPair<A,B> {}

      class Test<K,V> {
          private static class Bucket extends LinkedList<MPair<K,V>> {}
          private Bucket[] buckets = new Test.Bucket[100];
      }

            Assignee:
            Neal Gafter (Inactive)
            Reporter:
            Neal Gafter (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: