From 10cf73815b04d3d3d214adc1d5176daa81916e8f Mon Sep 17 00:00:00 2001 From: Lukas Rytz Date: Fri, 11 Sep 2009 08:18:50 +0000 Subject: fix #2268 --- test/files/run/names-defaults.scala | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test/files/run/names-defaults.scala') diff --git a/test/files/run/names-defaults.scala b/test/files/run/names-defaults.scala index 1d737bb0c7..8e8c8a1e4a 100644 --- a/test/files/run/names-defaults.scala +++ b/test/files/run/names-defaults.scala @@ -127,6 +127,12 @@ object Test extends Application { def bn2(a: Int, b: => Int)(c: Int = b) = a + b println(bn2(b = get(2), a = get(1))()) // should get: 1, 2, 2 + def bn3(a: => Int = get(10)) = 0 + def bn4(a: => Int = get(20)) = {a; a} + println(bn3()) + println(bn4()) + println(bn4(a = 0)) + // constructors val a1 = new A(b = "dlkfj")(d = 102) -- cgit v1.2.3