Javac accepts ambiguous compound type

XMLWordPrintable

    • 5.0
    • 5.0
    • generic
    • generic

      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> { }

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: