diff options
author | Heather Miller <heather.miller@epfl.ch> | 2012-05-07 09:35:46 +0200 |
---|---|---|
committer | Heather Miller <heather.miller@epfl.ch> | 2012-05-07 09:35:46 +0200 |
commit | 8d23a91c3c1f2d52f7de5622a551efcdf6517f8d (patch) | |
tree | 97541ef5c9edfacb383b636582868659bdbba281 | |
parent | ea25648d2737e6110b6a643b0ac4e852688a3cab (diff) | |
download | scala-8d23a91c3c1f2d52f7de5622a551efcdf6517f8d.tar.gz scala-8d23a91c3c1f2d52f7de5622a551efcdf6517f8d.tar.bz2 scala-8d23a91c3c1f2d52f7de5622a551efcdf6517f8d.zip |
Test case for SI-2066
-rw-r--r-- | test/pending/neg/t2066.scala | 16 |
1 files changed, 16 insertions, 0 deletions
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 |