summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2012-12-05 16:17:53 +0100
committerJason Zaugg <jzaugg@gmail.com>2012-12-05 16:17:53 +0100
commitcab8ea440bffbabe56f3860f6fb319b4334a6def (patch)
tree36618184cb91c9778159bfd7218cf50659e882dc /test
parent90efa6bc35f0e4e1d37389af5a681836a03b68e5 (diff)
downloadscala-cab8ea440bffbabe56f3860f6fb319b4334a6def.tar.gz
scala-cab8ea440bffbabe56f3860f6fb319b4334a6def.tar.bz2
scala-cab8ea440bffbabe56f3860f6fb319b4334a6def.zip
Expand test with a stably qualified example.
In the example below, we need a view from `String => l.F0`, and the companion object `FO` is reachable by a stable, non existentially-bound path. class Lift { def apply(f: F0) {} class F0 object F0 { implicit def f2f0(fn: String): F0 = ??? } } object Test { val l = new Lift l.apply("") // okay } Followup for SI-3995
Diffstat (limited to 'test')
-rw-r--r--test/files/neg/t3995.check2
-rw-r--r--test/files/neg/t3995.scala7
2 files changed, 8 insertions, 1 deletions
diff --git a/test/files/neg/t3995.check b/test/files/neg/t3995.check
index 844150a528..00ecf4ca5b 100644
--- a/test/files/neg/t3995.check
+++ b/test/files/neg/t3995.check
@@ -1,4 +1,4 @@
-t3995.scala:24: error: type mismatch;
+t3995.scala:31: error: type mismatch;
found : String("")
required: _1.F0 where val _1: Lift
(new Lift).apply("")
diff --git a/test/files/neg/t3995.scala b/test/files/neg/t3995.scala
index 8eb4698aaa..b03617ac86 100644
--- a/test/files/neg/t3995.scala
+++ b/test/files/neg/t3995.scala
@@ -13,6 +13,13 @@ object Test {
"": l.F0 // okay
+ l.apply("") // okay
+
+ {
+ val l = new Lift
+ l.apply("") // okay
+ }
+
// fails trying to mkAttributedQualifier for pre = Skolem(_1 <: Lift with Singletom).F0
// should this even have shown up in `companionImplicitMap`? It says that:
//