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

Spurious unchecked cast warning

    Details

    • Subcomponent:
    • Introduced In Build:
      5.0
    • Introduced In Version:
      5.0
    • CPU:
      generic
    • OS:
      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

              • 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: