2

When are the synthetic value generated? What are they used for? During which compiler phase are they erased? I keep encountering errors about synthetic values when making a scala compiler plugin. Here's the error:

error: scala.reflect.internal.FatalError: symbol value x$3#33790 does not exist in scala.collection.immutable.Stream.scala$collection$immutable$Stream$$advance$1, which contains locals value newvalue#39255,value newvalue#39254,value rest#33601,value stub1#33600,value 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
      }
  }
user5279007
  • 255
  • 2
  • 6
  • 1
    can you provide an example to replicate your issue? – tuxdna Sep 02 '15 at 07:11
  • @tuxdna I describe this problem in detail in another post. http://stackoverflow.com/questions/32389716/how-to-set-the-symbol-for-a-raw-ast-when-writing-a-scala-compiler-plugin – user5279007 Sep 04 '15 at 03:44

0 Answers0