diff options
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Implicits.scala | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Implicits.scala b/src/compiler/scala/tools/nsc/typechecker/Implicits.scala index d9a4f60d48..025c262c8d 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Implicits.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Implicits.scala @@ -404,6 +404,7 @@ trait Implicits { def complexity(tp: Type): Int = tp.dealias match { case NoPrefix => 0 case SingleType(pre, sym) => if (sym.isPackage) 0 else complexity(tp.dealiasWiden) + case ThisType(sym) => if (sym.isPackage) 0 else 1 case TypeRef(pre, sym, args) => complexity(pre) + (args map complexity).sum + 1 case RefinedType(parents, _) => (parents map complexity).sum + 1 case _ => 1 |