From 15d8a2e9804fe55c9261e195088da55c0eaa6803 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Wed, 18 Dec 2013 11:29:13 +0100 Subject: Making sure New's always end in an application. --- tests/pos/overloaded.scala | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'tests/pos/overloaded.scala') diff --git a/tests/pos/overloaded.scala b/tests/pos/overloaded.scala index d76585f93..ba5d8c205 100644 --- a/tests/pos/overloaded.scala +++ b/tests/pos/overloaded.scala @@ -6,5 +6,17 @@ object overloaded { val x1 = f("abc") val x2 = f(new Integer(1)) val x3 = f(null) + + val x4: String => String = f + val x5: String => Any = f + val x6: Any = f _ + + def g(): Int = 1 + def g(x: Int): Int = 2 + + val y1: Int => Int = g + val y2: Any = g _ + + println(g) } -- cgit v1.2.3