summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/Typers.scala
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2013-11-21 11:40:52 +0100
committerJason Zaugg <jzaugg@gmail.com>2013-11-21 11:41:56 +0100
commit33a086b97a5a7763acbf70e42edadace4d4cff95 (patch)
treedb6518ebf245d157565468ca831e29b97d854256 /src/compiler/scala/tools/nsc/typechecker/Typers.scala
parentc243435f113615b2f7407fbd683c93ec16c73749 (diff)
downloadscala-33a086b97a5a7763acbf70e42edadace4d4cff95.tar.gz
scala-33a086b97a5a7763acbf70e42edadace4d4cff95.tar.bz2
scala-33a086b97a5a7763acbf70e42edadace4d4cff95.zip
Handle TypeApply(fun, ...) for symbol-less funs
Such as class literals, as one could conjure in `classOf[Int][Int]` Before, this would crash with a `NullPointerException`
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Typers.scala')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Typers.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
index fa704adde2..8594309818 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
@@ -5051,7 +5051,7 @@ trait Typers extends Adaptations with Tags with TypersTracking with PatternTyper
// @M: fun is typed in TAPPmode because it is being applied to its actual type parameters
val fun1 = typed(fun, mode.forFunMode | TAPPmode)
- val tparams = fun1.symbol.typeParams
+ val tparams = if (fun1.symbol == null) Nil else fun1.symbol.typeParams
//@M TODO: val undets_fun = context.undetparams ?
// "do args first" (by restoring the context.undetparams) in order to maintain context.undetparams on the function side.