scala/scala — pull request #2638 by paulp (2013-06-06 13:03:35+00:00)
Title: Cleanup of crash output.

I finally ran across the assert (or one of them) which produces such
voluminous output that it scares the cattle. When you see "decls" in an
assert, run.

After silencing that, I extended the journey into quieting the default crash
message down, way down. I assume this will be met only with sighs of relief.
And then most challenging of all for some reason, I convinced it to only print
the information once.

Volume of crash data generated when reproducing the fsc bug shown below:

Before this commit 1158 lines
After this commit 27 lines

Pretty sure there's more information in the 27 lines. To reproduce the crash:

fsc src/library/scala/collection/immutable/IntMap.scala
fsc src/library/scala/collection/immutable/IntMap.scala

The first compile succeeds quietly; the second throws warnings out of the
gate, then crashes. And the "after" output:

error: Cannot create static reference to method equals because object
GenMapLike$class has no source module
error: fatal error:
while compiling:
/scala/trunk/src/library/scala/collection/immutable/IntMap.scala
during phase: globalPhase=mixin, enteringPhase=cleanup
library version: version 2.11.0-20130606-052937-392858b4f6
compiler version: version 2.11.0-20130606-055515-1856bec71b
reconstructed args: -d /tmp

last tree to typer: Ident(key$2)
tree position: line 377 of
/scala/trunk/src/library/scala/collection/immutable/IntMap.scala
tree tpe: Int
symbol: value key$2 (flags: )
symbol definition: key$2: Int (a TermSymbol)
symbol package: scala.collection.immutable
symbol owners: value key$2 -> constructor IntMap$$anonfun$unionWith$2
-> anonymous class anonfun$unionWith$2
call site: object IntMap$Nil in package immutable in package
immutable

== Source file context for tree position ==

374 }
375 case (IntMap.Tip(key, value), x) => x.updateWith[S](key, value,
(x, y) => f(key, y, x))
376 case (x, IntMap.Tip(key, value)) => x.updateWith[S](key, value,
(x, y) => f(key, x, y))
377 case (IntMap.Nil, x) => x
378 case (x, IntMap.Nil) => x
379 }
380