summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/Typers.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2011-11-11 01:35:21 +0000
committerPaul Phillips <paulp@improving.org>2011-11-11 01:35:21 +0000
commit7f4fa0ec6f303c4ec535865a6cc5f117df221980 (patch)
tree864050d01c7629801a3e71d9128c70b20a6eb40f /src/compiler/scala/tools/nsc/typechecker/Typers.scala
parentd01ab1ba466c1c4778505ff4aa1747dde7309052 (diff)
downloadscala-7f4fa0ec6f303c4ec535865a6cc5f117df221980.tar.gz
scala-7f4fa0ec6f303c4ec535865a6cc5f117df221980.tar.bz2
scala-7f4fa0ec6f303c4ec535865a6cc5f117df221980.zip
A comment answering one of adriaan's philosophi...
A comment answering one of adriaan's philosophical musings on why programs fail, and a test case informed by the comment. Review by moors.
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Typers.scala')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Typers.scala6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
index 251d6e6f5c..e758c8960a 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
@@ -2246,6 +2246,12 @@ trait Typers extends Modes with Adaptations with PatMatVirtualiser {
// now fixed by using isWeaklyCompatible in exprTypeArgs
// TODO: understand why exactly -- some types were not inferred anymore (`ant clean quick.bin` failed)
// (I had expected inferMethodAlternative to pick up the slack introduced by using WildcardType here)
+ //
+ // @PP responds: I changed it to pass WildcardType instead of pt and only one line in
+ // trunk (excluding scalacheck, which had another) failed to compile. It was this line in
+ // Types: "refs = Array(Map(), Map())". I determined that inference fails if there are at
+ // least two invariant type parameters. See the test case I checked in to help backstop:
+ // pos/isApplicableSafe.scala.
isApplicableSafe(context.undetparams, followApply(pre.memberType(alt)), argtypes, pt)
}
if (sym.isOverloaded) {