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

compiler does not allow Object protected methods to be used in lambda

    Details

    • Subcomponent:
    • Introduced In Build:
      b73
    • Introduced In Version:
      8
    • Resolved In Build:
      b82
    • Verification:
      Verified

      Description

      Compiler does not allow Object protected methods to be used in lambda.

      Minimal testcase:

      interface I {
      Object clone();
      }

      class Test {
      I i = ()->null;
      }

      Produces error: attempting to assign weaker access privileges; was public

      The following JCK tests fail:
      lang/LMBD/lmbd002/lmbd00201m0/lmbd00201m0.html
      lang/LMBD/lmbd002/lmbd00201m2/lmbd00201m2.html

        Attachments

          Activity

            People

            • Assignee:
              mcimadamore Maurizio Cimadamore
              Reporter:
              vrudomet Victor Rudometov
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: