From 66fe64f8f72ba7d574e07d3308d72cd3766a5763 Mon Sep 17 00:00:00 2001 From: Brian McKenna Date: Mon, 7 Jan 2013 18:17:05 +1000 Subject: SI-6923 Context now buffers warnings as well as errors Code that was silently typed would not report warnings, even if it returned a successful result. This appeared in the following code which didn't show warnings even with -Ywarn-adapted-args: def foo(a: Any) = a; foo(1, 2) While the following would show the expected warning: def foo[A](a: Any) = a; foo(1, 2) --- test/files/neg/t4851/S.scala | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test/files/neg/t4851') diff --git a/test/files/neg/t4851/S.scala b/test/files/neg/t4851/S.scala index 1550892967..0a442ac7a9 100644 --- a/test/files/neg/t4851/S.scala +++ b/test/files/neg/t4851/S.scala @@ -10,6 +10,9 @@ object Test { val z2 = new J2() val z3 = new J2(()) + def anyId(a: Any) = a + val w1 = anyId(1, 2 ,3) + def main(args: Array[String]): Unit = { println(x1) println(x2) @@ -19,5 +22,7 @@ object Test { println(z1) println(z2) println(z3) + + println(w1) } } -- cgit v1.2.3