summaryrefslogtreecommitdiff
path: root/.gitattributes
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2015-03-17 18:14:08 -0700
committerJason Zaugg <jzaugg@gmail.com>2015-03-17 18:44:37 -0700
commitd0181ab3810f1e063b33e79b43f183a098de2aab (patch)
treeef6db3de02c81de1aef428debec5b34b96e35348 /.gitattributes
parentfa33395a25c87115c910e8d4a4124aee6134062b (diff)
downloadscala-d0181ab3810f1e063b33e79b43f183a098de2aab.tar.gz
scala-d0181ab3810f1e063b33e79b43f183a098de2aab.tar.bz2
scala-d0181ab3810f1e063b33e79b43f183a098de2aab.zip
Resurrect a test for type inference
This test was removed in ... when case class extension was disallowed. But the intent of the test was actually to exercise a path through type inference, described in `Infer#exprTypeArgs`. When I remove that special case, the test still fails: ``` test/files/pos/jesper.scala:29: error: No implicit view available from Pair.Cons[Int,Pair.Cons[Boolean,Pair.End]] => Boolean. val x2 : Boolean = p.find[Boolean] // Doesn't compile ^ one error found ``` This special case is important to understand when deciphering the inference in this program: ``` object Test { trait Cov[+A] def cov[A](implicit ev: Cov[A]): A = ??? implicit def covImp[A]: Cov[A] = ??? trait Inv[A] def inv[A](implicit ev: Inv[A]): A = ??? implicit def invImp[A]: Inv[A] = ??? trait Con[-A] def con[A](implicit ev: Con[A]): A = ??? implicit def conImp[A]: Con[A] = ??? cov : String // (Test.this.cov[String](Test.this.covImp[Nothing]): String); // (Test.this.cov[Nothing](Test.this.covImp[Nothing]): String) (or, without the special case in exprTypeArgs) inv : String // (Test.this.inv[Nothing](Test.this.invImp[Nothing]): String); con : String // (Test.this.con[Any](Test.this.conImp[Any]): String) } ```
Diffstat (limited to '.gitattributes')
0 files changed, 0 insertions, 0 deletions