Skip to content

regression involving DelayedInit #229

@retronym

Description

@retronym
class Broken {
  def is(ee: AnyRef) = {
    new Delayed {
      ee
    }
  }
}

class Delayed extends DelayedInit {
  def delayedInit(x: => Unit): Unit = ()
}
java.util.NoSuchElementException: key not found: value ee$1
    at scala.collection.MapLike.default(MapLike.scala:232)
    at scala.collection.mutable.HashMap.apply(HashMap.scala:65)
    at scala.tools.nsc.backend.jvm.BCodeSkelBuilder$PlainSkelBuilder$locals$.load(BCodeSkelBuilder.scala:392)
    at scala.tools.nsc.backend.jvm.BCodeBodyBuilder$PlainBodyBuilder.genLoad(BCodeBodyBuilder.scala:352)
    at scala.tools.nsc.backend.jvm.BCodeBodyBuilder$PlainBodyBuilder.genStat(BCodeBodyBuilder.scala:82)

Minimized from a compiler crash compiling the play test suite. Specs 2 uses DelayedInit in part of its DSL.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions