diff options
author | Adriaan Moors <adriaan.moors@typesafe.com> | 2014-02-13 16:59:04 -0800 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@typesafe.com> | 2014-02-13 16:59:04 -0800 |
commit | aa2f4a6f31b51e54d2486ba84eb5b8dd85793a74 (patch) | |
tree | e2ff84b5b8a15957e812de204b968a1894e83679 /src/compiler | |
parent | c83e01d47d941265fa5415c0f29a884c904fdfa0 (diff) | |
parent | 1067e23506aca5083ca915f1dbd7dba689170b36 (diff) | |
download | scala-aa2f4a6f31b51e54d2486ba84eb5b8dd85793a74.tar.gz scala-aa2f4a6f31b51e54d2486ba84eb5b8dd85793a74.tar.bz2 scala-aa2f4a6f31b51e54d2486ba84eb5b8dd85793a74.zip |
Merge pull request #3524 from paulp/pr/8280
SI-8280 regression in implicit selection.
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Implicits.scala | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Implicits.scala b/src/compiler/scala/tools/nsc/typechecker/Implicits.scala index 776920ed42..8f5778862d 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Implicits.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Implicits.scala @@ -306,7 +306,10 @@ trait Implicits { */ object Function1 { val Sym = FunctionClass(1) - def unapply(tp: Type) = tp baseType Sym match { + // It is tempting to think that this should be inspecting "tp baseType Sym" + // rather than tp. See test case run/t8280 and the commit message which + // accompanies it for explanation why that isn't done. + def unapply(tp: Type) = tp match { case TypeRef(_, Sym, arg1 :: arg2 :: _) => Some((arg1, arg2)) case _ => None } |