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

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

    XMLWordPrintable

Details

    • b73
    • 8
    • b82
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: