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

Javac accepts ambiguous compound type

    Details

    • Subcomponent:
    • Introduced In Build:
      5.0
    • Introduced In Version:
      5.0
    • CPU:
      generic
    • OS:
      generic

      Description

      Javac accepts this program:

      class Test2 <T extends I1 & I2> { }
       
      interface I1 {
          int getFoo();
      }
       
      interface I2 {
          float getFoo();
      }

      But correctly rejects this version:

      interface I1 {
          int getFoo();
      }
       
      interface I2 {
          float getFoo();
      }
       
      class Test2 <T extends I1 & I2> { }

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: