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

javac can incorrectly add primitive bounds during inference

    XMLWordPrintable

Details

    Description

      While compiling this code:

      class Test {
          <Z> Z m(Z z) { return null; }

          void test() {
              double d1 = m(1);
          }
      }

      the code is successfully compiled but javac adds an "int" bound during inference.

      Attachments

        Activity

          People

            vromero Vicente Arturo Romero Zaldivar
            vromero Vicente Arturo Romero Zaldivar
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: