From 8c69f4da333f17290da26c3951fa9c8805014e47 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Tue, 18 Sep 2012 17:21:35 +0200 Subject: 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. --- test/files/neg/t6336.scala | 1 + 1 file changed, 1 insertion(+) (limited to 'test/files/neg/t6336.scala') 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) -- cgit v1.2.3