diff options
author | Adriaan Moors <adriaan.moors@typesafe.com> | 2016-03-24 14:50:44 -0700 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@typesafe.com> | 2016-03-26 22:55:14 -0700 |
commit | 925b394dbf2fc8f9a0a6f64e374dc6ab5564ab37 (patch) | |
tree | 3971d6191046a498f2b48fc73ea5d29edfe9c70b /src/compiler/scala/tools/nsc/typechecker/Infer.scala | |
parent | aa972dc100544179beecde48b52dfdb847162001 (diff) | |
download | scala-925b394dbf2fc8f9a0a6f64e374dc6ab5564ab37.tar.gz scala-925b394dbf2fc8f9a0a6f64e374dc6ab5564ab37.tar.bz2 scala-925b394dbf2fc8f9a0a6f64e374dc6ab5564ab37.zip |
Refactor: simplify fallbackAfterVanillaAdapt.
Trying to figure out if we can avoid adapting to SAM, and just
type them once and for all in typedFunction. Looks like overload
resolution requires SAM adaptation to happen in adapt.
Cleaned up while I was in the area.
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Infer.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Infer.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Infer.scala b/src/compiler/scala/tools/nsc/typechecker/Infer.scala index 9b42841eb8..dc91d23011 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Infer.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Infer.scala @@ -1220,7 +1220,7 @@ trait Infer extends Checkable { } def inferModulePattern(pat: Tree, pt: Type) = - if (!(pat.tpe <:< pt)) { + if ((pat.symbol ne null) && pat.symbol.isModule && !(pat.tpe <:< pt)) { val ptparams = freeTypeParamsOfTerms(pt) debuglog("free type params (2) = " + ptparams) val ptvars = ptparams map freshVar |