Object Bug
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
Confirmed. In next release I will fix the case for PUBLIC/PROTECTED/PACKAGE-PRIVATE constructors. I will address PRIVATE constructors in one of the following releases
Please check release 1.2.6 - now your case should work except private ObjectTest(...) constructor
Thank you!