Skip to content

Object Bug #20

@brr53

Description

@brr53

Dear @vsilaev , thank you again for the great work on Tascalate!

I've noticed a small bug which I have not been able to locate the error in the source for. Here is the code to reproduce the result:

Java version: 11

  public class ObjectTest {
    public ObjectTest() {
  
    }
  
    public static void main(String[] args) {
      new ObjectTest().test2();
    }
  
    @async
    CompletionStage<String> test1() {
      return CallContext.async("hello");
    }
  
    @async
    void test2() {
      var s = await(test1());
      System.out.println(s);
      var tempObject = new ObjectTest(); //breaks
    }
  }

I get the following error when initializing an object of the same class.

Error: Unable to initialize main class asynctest.ObjectTest
Caused by: java.lang.VerifyError: Bad operand type when invoking
Exception Details:
Location:
asynctest/ObjectTest.access$0(Lasynctest/ObjectTest;)V @1: invokespecial
Reason:
Invalid type: 'asynctest/ObjectTest' (current frame, stack[0])
Current Frame:
bci: @1
flags: { }
locals: { 'asynctest/ObjectTest' }
stack: { 'asynctest/ObjectTest' }
Bytecode:
0000000: 2ab7 0012 b1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions