summaryrefslogtreecommitdiff
path: root/test/pending/neg/t2066.scala
diff options
context:
space:
mode:
authorHeather Miller <heather.miller@epfl.ch>2012-05-07 09:35:46 +0200
committerHeather Miller <heather.miller@epfl.ch>2012-05-07 09:35:46 +0200
commit8d23a91c3c1f2d52f7de5622a551efcdf6517f8d (patch)
tree97541ef5c9edfacb383b636582868659bdbba281 /test/pending/neg/t2066.scala
parentea25648d2737e6110b6a643b0ac4e852688a3cab (diff)
downloadscala-8d23a91c3c1f2d52f7de5622a551efcdf6517f8d.tar.gz
scala-8d23a91c3c1f2d52f7de5622a551efcdf6517f8d.tar.bz2
scala-8d23a91c3c1f2d52f7de5622a551efcdf6517f8d.zip
Test case for SI-2066
Diffstat (limited to 'test/pending/neg/t2066.scala')
-rw-r--r--test/pending/neg/t2066.scala16
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