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

Error expected for declaring a 'clone' default method

    Details

      Description

      This declaration compiles without error:

        interface I1 {
          default Object clone() { return this; }
        }

      Per JLS 9.4.1.2, an error is expected: the default method is override-equivalent with Object.clone, a non-private method of class Object.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                sadayapalam Srikanth Adayapalam
                Reporter:
                dlsmith Dan Smith
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: