Permalink
Browse files

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
  • Loading branch information...
1 parent 90efa6b commit cab8ea440bffbabe56f3860f6fb319b4334a6def @retronym retronym committed Dec 5, 2012
Showing with 8 additions and 1 deletion.
  1. +1 −1 test/files/neg/t3995.check
  2. +7 −0 test/files/neg/t3995.scala
@@ -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("")
@@ -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:
//

0 comments on commit cab8ea4

Please sign in to comment.