diff options
author | Adriaan Moors <adriaan.moors@epfl.ch> | 2012-04-25 16:29:53 +0200 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@epfl.ch> | 2012-04-25 16:29:53 +0200 |
commit | daeee868956faaa92c4ea873e0c6b24b52202ee7 (patch) | |
tree | 1ac1ce1a65b6b2f369ed130a4cb9417320bcfbac | |
parent | ef48117f4e408da8e62624e4f3efebf7233fb741 (diff) | |
download | scala-daeee868956faaa92c4ea873e0c6b24b52202ee7.tar.gz scala-daeee868956faaa92c4ea873e0c6b24b52202ee7.tar.bz2 scala-daeee868956faaa92c4ea873e0c6b24b52202ee7.zip |
fail gracefully on very messed up source files
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/PatMatVirtualiser.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/PatMatVirtualiser.scala b/src/compiler/scala/tools/nsc/typechecker/PatMatVirtualiser.scala index 56830339bc..e5dc8e9ca9 100644 --- a/src/compiler/scala/tools/nsc/typechecker/PatMatVirtualiser.scala +++ b/src/compiler/scala/tools/nsc/typechecker/PatMatVirtualiser.scala @@ -1141,7 +1141,7 @@ class Foo(x: Other) { x._1 } // no error in this order val matchStrategy: Tree def inMatchMonad(tp: Type): Type = appliedType(oneSig, List(tp)).finalResultType - def pureType(tp: Type): Type = appliedType(oneSig, List(tp)).paramTypes.head + def pureType(tp: Type): Type = appliedType(oneSig, List(tp)).paramTypes.headOption getOrElse NoType // fail gracefully (otherwise we get crashes) protected def matchMonadSym = oneSig.finalResultType.typeSymbol import CODE._ |