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

Spurious unchecked cast warning

    XMLWordPrintable

Details

    • 5.0
    • 5.0
    • generic
    • solaris_8

    Description

      The following program is given an unchecked cast warning, but there should
      be no warning because the cast is statically known to be safe.

      class Main {
          <T, U extends T, V extends T> T cond1(boolean z, U x1, V x2) {
              return (z? (T) x1: x2);
          }
      }

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: