summaryrefslogtreecommitdiff
path: root/test/files/neg/vincent1.scala
blob: afcb9a94f4db944f4ec0594b1bc928ce50504d2b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
module test {

  trait A { type T; }

  trait B { type T; }

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

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

  val s: b.T = "coucou";

}