Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4881416

generics: use of inner raw class causes verify error

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P4
    • None
    • 5.0
    • tools
    • generic
    • solaris_8

    Description

      From: Remi Forax <###@###.###>
      >public class Outer<T> {
      > class Inner<U extends Number> {
      > U u;
      >
      > void set(U u) {
      > this.u=u;
      > }
      > }
      >
      > public static void main(String[] args) {
      > new Outer<Object>().new Inner().set("toto");
      > }
      >}
      >
      >In the code above, the compiler don't detect the use
      >of the class Inner as a raw type. This code compile and
      >raise a VerifyError during the execution.
      >
      >This bug doesn't appear if the class Outer isn't a generic class.

      Attachments

        Issue Links

          Activity

            People

              gafter Neal Gafter
              gafter Neal Gafter
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: