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

ClassFormatError if trait (accidentally) "extends" interface

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.3.0-beta-1
    • Fix Version/s: 2.3.0-beta-2
    • Component/s: Compiler
    • Labels:
      None

      Description

      interface Foo {}
      trait Bar extends Foo {} // oops: should be "implements"
      

      No compile error occurs. Runtime error: "java.lang.ClassFormatError: Interfaces must have java.lang.Object as superclass in class file Bar"

        Attachments

          Activity

            People

            • Assignee:
              melix C├ędric Champeau
              Reporter:
              pniederw Peter Niederwieser
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: