scala/scala — pull request #2784 by soc (2013-07-30 00:33:44+00:00)
Title: Improve type printing (crashes)

Crashes now unroll more like this:

// SI-7406
class Arne[@specialized(Int) T](x: T) { lazy val y = x }

% scalac a.scala
error: assertion failed: Arne$mcI$sp.this.$asInstanceOf[Int.type]().unbox

at scala.tools.nsc.ast.TreeGen.mkCast(TreeGen.scala:146)
at scala.tools.nsc.Global$gen$.mkAttributedCast(Global.scala:106)
at scala.tools.nsc.transform.Erasure$Eraser.cast(Erasure.scala:636)
at scala.tools.nsc.transform.Erasure$Eraser.scala$tools$nsc$transform$Erasure$Eraser$$adaptToType(Erasure.scala:665)
at scala.tools.nsc.transform.Erasure$Eraser.adapt(Erasure.scala:765)
at scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5345)
at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedInternal(Typers.scala:5358)
at scala.tools.nsc.typechecker.Typers$Typer.body$3(Typers.scala:5305)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5310)
at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$60.apply(Typers.scala:3021)

while compiling: a.scala
during phase: mixin
library version: version 2.11.0-20130608-020907-869ebd8bf2
compiler version: version 2.11.0-20130608-041104-feb660ccd7

one error found