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

cannot unbox from bound of type variable.

    XMLWordPrintable

Details

    • generic
    • solaris_8

    Description

      ==========$ cat -n Main.java
           1 class Main {
           2 <U extends Integer, V extends Double> Number cond1(boolean z, U x1, V x2) {
           3 return (z? x1 : x2);
           4 }
           5 }
      ==========$ newjavac Main.java
      + exec /usr/j2sdk1.5.0/bin/javac -J-esa -source 1.5 -target 1.5 -XDdev Main.java
      Main.java:3: cannot find symbol
      symbol : method intValue()
      location: bound of type variable U
              return (z? x1 : x2);
                         ^
      Fatal Error: Unable to find method intValue
      ==========$

      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: