何时生成合成值?它们用于什么?在哪个编译器阶段被删除?在制作scala编译器插件时,我一直遇到有关合成值的错误。这是错误:
错误:scala.reflect.internal.FatalError: 符号值x $ 3#33790在scala.collection.immutable.Stream.scala $ collection中不存在$ immutable $ Stream $$ advance $ 1,其中包含locals值newvalue#39255,value newvalue#39254,value rest#33601,value stub1 #33600,值stub0#33599。
Method code: def advance(stub0: List[A], stub1: List[A], rest: Stream[A]): Stream[A] = if (rest.isEmpty())
Stream.empty()
else
{
if (stub0.isEmpty())
{
val newvalue: scala#27.collection#2835.immutable#5932.Stream#8383 = Stream.this.scala$collection$immutable$Stream$$advance$1(stub1.reverse(), Nil, rest);
newvalue
}
else
{
val newvalue: collection#2835.immutable#5932.Stream$Cons#11078 = scala.collection.immutable.Stream$cons.apply(stub0.head(), {
((new <$anon: Function0#2069>(Stream.this, stub0, stub1, rest, x$3)): Function0#2069)
});
newvalue
}
}