Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-1611

Groovy should complain when you provide method bodies in an interface

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.0-RC-1
    • 1.0
    • None
    • None

    Description

      According to javap -c, the following code:

      interface bug14 {
      def Ricky()

      { println "Two Smokes, Let's Go" }

      }

      Produces a valid interface, but the method body is silently ignored. It should cause a compile time error.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            mcspanky Martin C. Martin
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment