Details

    • Subcomponent:
    • CPU:
      generic
    • OS:
      generic

      Description

      In this program, only cast 3 should be rejected:

      import java.util.List;
      public class X<S extends Comparable<S>> {

         Object foo(Comparable<Integer> c) {
               return (Comparable<S>) c; // 1
         }

         <U extends Throwable, V extends Runnable> void foo(List<V> lv) {
               List l = (List<U>) lv; // 2
         }

         <U extends Throwable, V extends Runnable> void foo2(List<List<V>> lv) {
               List l = (List<List<U>>) lv; // 3
         }
      }

      ###@###.### 2005-05-13 15:51:12 GMT

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                mcimadamore Maurizio Cimadamore
                Reporter:
                ahe Peter Ahe
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: