From 39fb348121e43dd3d48b378f43a68ed8fc5fc157 Mon Sep 17 00:00:00 2001 From: Lukas Rytz Date: Thu, 12 Nov 2009 14:57:15 +0000 Subject: avoid illegal forward references by moving synt... avoid illegal forward references by moving synthetics to the beginning of the statement-list. fixes #2489 --- test/files/run/names-defaults.scala | 3 +++ 1 file changed, 3 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 d5524b95ab..0d4f3df42e 100644 --- a/test/files/run/names-defaults.scala +++ b/test/files/run/names-defaults.scala @@ -265,6 +265,9 @@ object Test extends Application { // #2390 case class A2390[T](x: Int) { def copy(a: Int)(b: Int = 0) = 0 } + // #2489 + class A2489 { def foo { def bar(a: Int = 1) = a; bar(); val u = 0 } } + // DEFINITIONS def test1(a: Int, b: String) = println(a +": "+ b) def test2(u: Int, v: Int)(k: String, l: Int) = println(l +": "+ k +", "+ (u + v)) -- cgit v1.2.3