summaryrefslogtreecommitdiff
path: root/test/files/neg/t6336.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2012-09-18 17:21:35 +0200
committerMartin Odersky <odersky@gmail.com>2012-09-18 17:21:35 +0200
commit8c69f4da333f17290da26c3951fa9c8805014e47 (patch)
treed6d9b237e6664f2842c2c8a797f0cc745050d3bd /test/files/neg/t6336.scala
parent61480eb14a07c78a6746d2a6dc1e302d5baa112f (diff)
downloadscala-8c69f4da333f17290da26c3951fa9c8805014e47.tar.gz
scala-8c69f4da333f17290da26c3951fa9c8805014e47.tar.bz2
scala-8c69f4da333f17290da26c3951fa9c8805014e47.zip
SI-6336 Now also catches return types
As Mark's comments on SI-6336 shows, we also need to disallow value classes as return types of structural types.
Diffstat (limited to 'test/files/neg/t6336.scala')
-rw-r--r--test/files/neg/t6336.scala1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/files/neg/t6336.scala b/test/files/neg/t6336.scala
index a9844ff94f..b1d61f4dd2 100644
--- a/test/files/neg/t6336.scala
+++ b/test/files/neg/t6336.scala
@@ -1,6 +1,7 @@
object D {
def main(args: Array[String]) {
val a = new { def y[T](x: X[T]) = x.i }
+ val b = new { def y[T](x: T): X[T] = new X(2) }
val x = new X(3)
val t = a.y(x)
println(t)