summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristopher Vogt <christopher.vogt@epfl.ch>2013-07-14 06:47:49 +0200
committerJason Zaugg <jzaugg@gmail.com>2013-07-16 12:39:00 +1000
commitc4bf1d5fb5a4d5e64e64b6af985fc795faa15bce (patch)
treee3ac40d3334ce79d8f596376becfe732ae733356 /src
parent2247593472031fd9712b652bab0b978a788e46ef (diff)
downloadscala-c4bf1d5fb5a4d5e64e64b6af985fc795faa15bce.tar.gz
scala-c4bf1d5fb5a4d5e64e64b6af985fc795faa15bce.tar.bz2
scala-c4bf1d5fb5a4d5e64e64b6af985fc795faa15bce.zip
SI-7636 Fix a NPE in typing class constructors
If we encountered an erroneous super call due to a failure in parent type argument inference, we must avoid inspecting the untyped children of erroneous trees.
Diffstat (limited to 'src')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Typers.scala2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
index 1a2e498bca..bf2170310f 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
@@ -2010,6 +2010,8 @@ trait Typers extends Modes with Adaptations with Tags {
// !!! This method is redundant with other, less buggy ones.
def decompose(call: Tree): (Tree, List[Tree]) = call match {
+ case _ if call.isErrorTyped => // e.g. SI-7636
+ (call, Nil)
case Apply(fn, args) =>
// an object cannot be allowed to pass a reference to itself to a superconstructor
// because of initialization issues; SI-473, SI-3913, SI-6928.