Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8157142

Verifier error when using a lambda in super constructor call

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P4
    • None
    • None
    • tools
    • None

    Description

      I get the following verify error:

      java.lang.VerifyError: Bad type on operand stack

      Exception Details:

        Location:

          org/jetbrains/plugins/ruby/ruby/run/configuration/RubyRunConfigurationType$RubyRunConfigurationFactory.<init>(Lorg/jetbrains/plugins/ruby/ruby/run/configuration/RubyRunConfigurationType;)V @8: invokedynamic

        Reason:

          Type uninitializedThis (current frame, stack[2]) is not assignable to 'org/jetbrains/plugins/ruby/ruby/run/configuration/RubyRunConfigurationType$RubyRunConfigurationFactory'

        Current Frame:

          bci: @8

          flags: { flagThisUninit }

          locals: { uninitializedThis, 'org/jetbrains/plugins/ruby/ruby/run/configuration/RubyRunConfigurationType' }

          stack: { uninitializedThis, 'org/jetbrains/plugins/ruby/ruby/run/configuration/RubyRunConfigurationType', uninitializedThis }

        Bytecode:

          0x0000000: 2a2b b500 012a 2b2a ba00 0200 00b7 0003

          0x0000010: b1

       

                      at org.jetbrains.plugins.ruby.ruby.run.configuration.RubyRunConfigurationType.<init>(RubyRunConfigurationType.java:46)

                      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

                      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)

                      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

                      at java.lang.reflect.Constructor.newInstance(Constructor.java:423)

       

       

      when I convert anonymous class to lambda inside super constructor call in inner class. (myRubyScriptFactory - is a final field of the outer class.)

       

      Before (works normally):

      public RubyRunConfigurationFactory() {
        super(RubyRunConfigurationType.this, new Function<Project, AbstractRubyRunConfiguration>() {
          public AbstractRubyRunConfiguration fun(Project project) {
            return new RubyRunConfiguration(project, myRubyScriptFactory);
          }
        });
      }

       

      After (verify error):

      public RubyRunConfigurationFactory() {
        super(RubyRunConfigurationType.this, project -> new RubyRunConfiguration(project, myRubyScriptFactory));
      }

      Attachments

        Issue Links

          Activity

            People

              sadayapalam Srikanth Adayapalam (Inactive)
              mcimadamore Maurizio Cimadamore
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: