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

Javac accepts ambiguous compound type

    XMLWordPrintable

Details

    • 5.0
    • 5.0
    • generic
    • 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

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

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: