Details

    • Subcomponent:
    • CPU:
      generic
    • OS:
      generic

      Description

      This should cause a warning.

      class Pair<X,Y> {}

      class ObjectPair extends Pair<Object,Object> {}

      class Test<X,Y>{
          public Pair<X,Y> m() {
              return (Pair<X,Y>)new ObjectPair(); // warning missing here
          }

          public static void main(String[] args) {
              Test<String,String> t = new Test<String,String>();
              Pair<String,String> pss = t.m();
          }
      }

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: