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

ClassCastException in javac with conjunction types

    Details

    • Subcomponent:
    • Resolved In Build:
      b140
    • CPU:
      x86
    • OS:
      windows_7
    • Verification:
      Verified

      Description

      FULL PRODUCT VERSION :


      A DESCRIPTION OF THE PROBLEM :
      interface A
      {
          abstract <T> void foo();
      }

      interface B
      {
          abstract void foo();
      }

      class C<T extends A & B>
      {
          void bar(T x)
          {
              x.foo();
          }
      }

      javac throws the following exception:
      java.lang.ClassCastException: com.sun.tools.javac.code.Type$MethodType cannot be cast to com.sun.tools.javac.code.Type$ForAll


      REPRODUCIBILITY :
      This bug can be reproduced always.
      Bugs 4851398 and 4881362 reported crash using similar conjunction types but those could not be reproduce.
      This crashes same way with jdk5,6,7.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                mcimadamore Maurizio Cimadamore
                Reporter:
                webbuggrp Webbug Group
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: