groovy
  1. groovy
  2. GROOVY-4924

Class implementing a generic interface causes VerifyError

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.7.10, 1.8.0
    • Fix Version/s: 1.8.1, 1.7.11
    • Component/s: None
    • Labels:
      None
    • Environment:
      Groovy Version: 1.8.0 JVM: 1.6.0_0
    • Testcase included:
      yes
    • Number of attachments :
      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)
      

        Activity

        Hide
        blackdrag blackdrag added a comment -

        looks like the bridge method creation code does simply ignore double and long taking two slots

        Show
        blackdrag blackdrag added a comment - looks like the bridge method creation code does simply ignore double and long taking two slots
        Hide
        blackdrag blackdrag added a comment -

        fixed

        Show
        blackdrag blackdrag added a comment - fixed

          People

          • Assignee:
            blackdrag blackdrag
            Reporter:
            Daniel Vekhter
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: