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

Class implementing a generic interface causes VerifyError

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.7.10, 1.8.0
    • 1.8.1, 1.7.11
    • None
    • None
    • Groovy Version: 1.8.0 JVM: 1.6.0_0

    Description

      This script:

      interface Interface<SomeType> {
         public void handle(long a, SomeType x);
      }
      
      class InterfaceImpl
      implements Interface<String> {
          public void handle(long a, String something) {
              println(something);
          }
      }
      
      InterfaceImpl test = new InterfaceImpl()
      test.handle(5, "hi");
      

      causes:

      Caught: java.lang.VerifyError: (class: InterfaceImpl, method: handle signature: (JLjava/lang/Object;)V) Register 2 contains wrong type
              at Test.class$(Test.groovy)
              at Test.$get$$class$InterfaceImpl(Test.groovy)
              at Test.run(Test.groovy:12)
      

      Attachments

        Activity

          People

            blackdrag Jochen Theodorou
            dvekhter Daniel Vekhter
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: