Java file:
public class Test {
public interface Interface {
int call(int i);
}
public class Cls {
private Interface i;
public Cls(Interface i) {
this.i = i;
}
}
}
Kotlin file:
object Main {
fun main() {
val a = Test.Cls { it }
}
}
Expected behavior:
Report error of “Constructor of inner class can only be called with receiver of containing class”
Current behavior:
When compile, it reports “Internal error: Unsupported receiver value: null” in the codegen. And in IDEA, it reports an “Assertion error” with a long stacktrace. It seems that the the error is not detected in the code analysis phase.
Kotlin version: 1.2