From 8d23a91c3c1f2d52f7de5622a551efcdf6517f8d Mon Sep 17 00:00:00 2001 From: Heather Miller Date: Mon, 7 May 2012 09:35:46 +0200 Subject: Test case for SI-2066 --- test/pending/neg/t2066.scala | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 test/pending/neg/t2066.scala (limited to 'test/pending/neg/t2066.scala') diff --git a/test/pending/neg/t2066.scala b/test/pending/neg/t2066.scala new file mode 100644 index 0000000000..46177b19f7 --- /dev/null +++ b/test/pending/neg/t2066.scala @@ -0,0 +1,16 @@ +object Test extends App { + trait A { + def f[T[_]](x : T[Int]) : T[Any] + } + + class B extends A { + def f[T[+_]](x : T[Int]) : T[Any] = x + } + + class P[Y](var y : Y) + + val p = new P(1) + val palias = (new B():A).f[P](p) + palias.y = "hello" + val z: Int = p.y +} \ No newline at end of file -- cgit v1.2.3