javac can incorrectly add primitive bounds during inference

XMLWordPrintable

      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.

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

              Created:
              Updated:
              Resolved: