| what expected |
An error. Although I cannot really say what the problem is, the code after AddConstructors is definitely wrong, type-wise. The class C then looks like this (simplified):
class C$0[outer$0$Main$Main <: Main]() extends I[x$0.type]() with ScalaObject() {
def <init>(outer$0$Main: outer$0$Main$Main, x$0: O): Unit = {
{
C$0.super.<init>(x$0);
()
};
()
}
};
The extends I[x$0.type]() is clearly wrong, as x$0 is not in scope at this point.
The problem here is that LambdaLift, when it extracts C from f, adds a value parameter to C to represent x. This parameter is then directly used in the extends clause, as the prefix for I. This is something that cannot be done by hand, and maybe the compiler shouldn't do it either. But I don't really know. Any ideas? |