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

legal cast is rejected

XMLWordPrintable

    • b55
    • generic, x86
    • generic, linux, solaris_8, windows_2000, windows_xp
    • Verified

        The following cast is legal yet rejected:

        class X {
            static class BB<T, S> { }
            static class BD<T> extends BB<T, T> { }
            void f() {
                BB<? extends Number, ? super Integer> bb = null;
                Object o = (BD<Number>) bb; // <<warn>> <<todo: cast-infer>>
            }
        }

              ahe Peter Ahe
              gafter Neal Gafter (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: