This appears to be a bug in LambdaLift which doesn't add an Apply node where it should. Here is a slightly less complex example which exhibits the same problem:
class A {
object B {
def f() = {
class C extends A {}; new C : A
}
}
}
The important part is the new C : A call. Before LambdaLift , it looks like this (with -uniqid):
class A#0() extends scala#1.Object#2() {
final class B#8() extends scala#1.Object#2() {
final def f#4(): A#0 = {
class C#5() extends A#6() {
};
(new C#7()) : A#0
}
};
private var B$#9: A#0.this.B#8 = null#10;
final def B#3(): A#0.this.B#8 = {
if (null#10.$eq$eq#11(A#0.this.B$#9))
A#0.this.B$#9 = new A#0.this.B#12()
else
{
};
A#0.this.B$#9
};
private def B_$eq#13(B#14: A#0.this.B#8): scala#1.Unit#15 = A#0.this.B$#9 = B#14
};
and after LambdaLift , it looks like this:
class A#0() extends scala#1.Object#2() {
final class B#8() extends scala#1.Object#2() {
final def f#4(): A#0 = {
(new A#0.this.B#3.C$0#7()) : A#0
};
class C$0#5() extends A#6() {
}
};
private var B$#9: A#0.this.B#8 = null#10;
final def B#3(): A#0.this.B#8 = {
if (null#10.$eq$eq#11(A#0.this.B$#9))
A#0.this.B$#9 = new A#0.this.B#12()
else
{
};
A#0.this.B$#9
};
private def B_$eq#13(B#14: A#0.this.B#8): scala#1.Unit#15 = A#0.this.B$#9 = B#14
};
which is wrong, since there is no (empty) parameter section given to B#3 even though it is a function.
|