Groovy
  1. Groovy
  2. GROOVY-4924

Class implementing a generic interface causes VerifyError

    Details

    • Type: Bug Bug
    • Status: 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

      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

        Daniel Vekhter created issue -
        Guillaume Delcroix made changes -
        Field Original Value New Value
        Assignee Jochen Theodorou [ blackdrag ]
        Guillaume Delcroix made changes -
        Fix Version/s 1.8.1 [ 17223 ]
        Fix Version/s 1.9-beta-1 [ 17153 ]
        Guillaume Delcroix made changes -
        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)
        This script:
        {code}
        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");
        {code}
        causes:

        {code}
        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)
        {code}
        Jochen Theodorou made changes -
        Affects Version/s 1.7.10 [ 17229 ]
        Fix Version/s 1.9-beta-1 [ 17153 ]
        Jochen Theodorou made changes -
        Fix Version/s 1.7.11 [ 17244 ]
        Status Open [ 1 ] Closed [ 6 ]
        Resolution Fixed [ 1 ]
        Mark Thomas made changes -
        Project Import Sun Apr 05 13:32:57 UTC 2015 [ 1428240777691 ]
        Mark Thomas made changes -
        Workflow jira [ 12733851 ] Default workflow, editable Closed status [ 12745645 ]
        Mark Thomas made changes -
        Project Import Mon Apr 06 02:11:23 UTC 2015 [ 1428286283443 ]
        Mark Thomas made changes -
        Workflow jira [ 12971371 ] Default workflow, editable Closed status [ 12979155 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development