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

unnecessary warning with cast

    Details

    • Subcomponent:
    • CPU:
      generic
    • OS:
      solaris_8

      Description

      The following cast is safe yet we give a warning:

      class X {
          interface CF<S> { }
          interface CG<T> { }
          static class CH<S, T> implements CF<S>, CG<T> { }
          interface CI<S> extends CF<S> { }
          interface CJ<T> extends CG<T> { }
          interface CK<S, T> extends CI<S>, CJ<T> { }
          void f() {
              Object o = (CH<String, Integer>) (CK<String, Integer>) null; // <<pass>> <<todo: cast-infer>>
          }
      }

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ahe Peter Ahe
                Reporter:
                gafter Neal Gafter
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: