summaryrefslogblamecommitdiff
path: root/test/neg/vincent1.scala
blob: fb047305ff561fd5a4cb5f5445c196748fb2d2ab (plain) (tree)
1
2
3
4
5
6
7
8
9
10
             




                     

                                      

                                         


                   
                                     




                        
object test {

  trait A { type T; }

  trait B { type T; }

  class Functor(x: A) { type T = x.T }

  def functor(x: A): B { type T = x.T } =
    new B {
      type T = x.T;
    };

  val a = new  A { type T = String };
  val b = functor(a);

  val s: b.T = "coucou";

}