-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Description
lazy val a = b | b
lazy val b = c | c
lazy val c = d | d
// ...
lazy val z = a | aExample courtesy of Michael Adams. I'm pretty sure this requires 2^26 operations to compute, since tracked is unshared between branches. Unfortunately, the fix is not as simple as extracting tracked to be shared by both branches, since doing so will cause nodes to not be revisited when their values have been subsequently determined. An example of where naive extraction will fail:
lazy val a: Parser[Any] = b ~ c
lazy val b: Parser[Any] = c | () ^^^ ""
lazy val c: Parser[Any] = b | "x"
a.isNullable must beTrueReactions are currently unavailable