Type inference for parameterized types in case of cyclic Builder scenario
Assuming there exists the following java class:
public class Test {
static class Builder{
B asBuilder() {
return (B) this;
}
}
public static B newBuilder() {
return new Builder().asBuilder();
}
}
Trying to call Test.newBuilder() in a consuming Kotlin code gives the error Type expected.
Test.newBuilder() has the same issue. Test.newBuilder() gives the error: One type argument expected for class Builder. Since the type argument is a...