diff options
author | odersky <odersky@gmail.com> | 2017-02-22 14:47:07 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-22 14:47:07 +0100 |
commit | 8a826ee3d7a7a7230dea8cc1fa4f87b70e8efe81 (patch) | |
tree | b201e8017cd3bec32071d7ebe3fec338d7105f76 /compiler/src/dotty/tools | |
parent | 5c7ef22a5464456a3e95869c0f6154a2ae8a5f84 (diff) | |
parent | 5e53ff36f1d9ac2bd433fa01e28a194810c1be74 (diff) | |
download | dotty-8a826ee3d7a7a7230dea8cc1fa4f87b70e8efe81.tar.gz dotty-8a826ee3d7a7a7230dea8cc1fa4f87b70e8efe81.tar.bz2 dotty-8a826ee3d7a7a7230dea8cc1fa4f87b70e8efe81.zip |
Merge pull request #2014 from dotty-staging/fix-#2002
Fix #2000: Make implicit and non-implicit functions incomparable
Diffstat (limited to 'compiler/src/dotty/tools')
-rw-r--r-- | compiler/src/dotty/tools/dotc/core/TypeComparer.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/src/dotty/tools/dotc/core/TypeComparer.scala b/compiler/src/dotty/tools/dotc/core/TypeComparer.scala index 6063cbf38..fca111702 100644 --- a/compiler/src/dotty/tools/dotc/core/TypeComparer.scala +++ b/compiler/src/dotty/tools/dotc/core/TypeComparer.scala @@ -489,7 +489,7 @@ class TypeComparer(initctx: Context) extends DotClass with ConstraintHandling { case tp1 @ MethodType(_, formals1) => (tp1.signature consistentParams tp2.signature) && matchingParams(formals1, formals2, tp1.isJava, tp2.isJava) && - (!tp1.isImplicit || tp2.isImplicit) && // non-implicit functions shadow implicit ones + (tp1.isImplicit == tp2.isImplicit) && isSubType(tp1.resultType, tp2.resultType.subst(tp2, tp1)) case _ => false |