summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2012-01-26 08:40:04 -0800
committerPaul Phillips <paulp@improving.org>2012-01-26 11:26:36 -0800
commit67420a8fa31c4570542450238b97e5ca1b54a86f (patch)
tree49d2760b1267c732eba1e06eb03140428a6379a0 /src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
parenta7aeddd038bead9cda67a85a922a7988b459ff04 (diff)
downloadscala-67420a8fa31c4570542450238b97e5ca1b54a86f.tar.gz
scala-67420a8fa31c4570542450238b97e5ca1b54a86f.tar.bz2
scala-67420a8fa31c4570542450238b97e5ca1b54a86f.zip
Intercept assert and require calls.
And abort calls, and unhandled exceptions, all so I can supplement the error message with a little of the vast quantity of useful information which we possess but do not reveal. "Details are sketchy," says the officer tasked with investigating the crash, but no longer. Also took the opportunity to eliminate a bunch of one-argument assertions and requirements if I thought there was any chance I'd someday be facing them on the wrong end of an incident. Have you ever dreamed that instead of this experience: % scalac -optimise <long list of files> error: java.lang.AssertionError: assertion failed: Record Record(anonymous class JavaToScala$$anonfun$makeScalaPackage$1,Map()) does not contain a field value owner$1 Things could proceed more like this: % scalac -optimise <long list of files> error: while compiling: src/compiler/scala/reflect/runtime/JavaToScala.scala current phase: closelim library version: version 2.10.0.rdev-4267-2012-01-25-gc94d342 compiler version: version 2.10.0.rdev-4270-2012-01-26-gd540ddf reconstructed args: -Ydead-code -optimise -Yinline -Yclosure-elim -Yinline-handlers -d /tmp error: java.lang.AssertionError: [etc] You are not dreaming! IT'S ALL HAPPENING
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/RefChecks.scala')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/RefChecks.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala b/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
index 1a54b26307..a99d09173e 100644
--- a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
@@ -1491,7 +1491,7 @@ abstract class RefChecks extends InfoTransform with reflect.internal.transform.R
def checkSuper(mix: Name) =
// term should have been eliminated by super accessors
- assert(!(qual.symbol.isTrait && sym.isTerm && mix == tpnme.EMPTY))
+ assert(!(qual.symbol.isTrait && sym.isTerm && mix == tpnme.EMPTY), (qual.symbol, sym, mix))
transformCaseApply(tree,
qual match {