summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2012-08-21 07:15:27 +0200
committerPaul Phillips <paulp@improving.org>2012-09-01 10:02:22 -0700
commitd9c0cb6165bd60d79bdf764291c417c86623b042 (patch)
tree7b9db194590ae8d884d4cafc2e12f923b4d893ba /src
parent6b87cdcd7bd6d1932e87e6bf8dc6029d6461a488 (diff)
downloadscala-d9c0cb6165bd60d79bdf764291c417c86623b042.tar.gz
scala-d9c0cb6165bd60d79bdf764291c417c86623b042.tar.bz2
scala-d9c0cb6165bd60d79bdf764291c417c86623b042.zip
Suppressed 'possible cause' mis-warning.
I have seen this warning a bunch of times and it has not yet been close to right.
Diffstat (limited to 'src')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Infer.scala11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Infer.scala b/src/compiler/scala/tools/nsc/typechecker/Infer.scala
index 28636fc76e..1b3602fca2 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Infer.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Infer.scala
@@ -280,7 +280,16 @@ trait Infer {
def issue(err: AbsTypeError): Unit = context.issue(err)
- def isPossiblyMissingArgs(found: Type, req: Type) = (found.resultApprox ne found) && isWeaklyCompatible(found.resultApprox, req)
+ def isPossiblyMissingArgs(found: Type, req: Type) = (
+ false
+ /** However it is that this condition is expected to imply
+ * "is possibly missing args", it is too weak. It is
+ * better to say nothing than to offer misleading guesses.
+
+ (found.resultApprox ne found)
+ && isWeaklyCompatible(found.resultApprox, req)
+ */
+ )
def explainTypes(tp1: Type, tp2: Type) =
withDisambiguation(List(), tp1, tp2)(global.explainTypes(tp1, tp2))