diff options
author | Lukas Rytz <lukas.rytz@epfl.ch> | 2009-11-12 14:57:15 +0000 |
---|---|---|
committer | Lukas Rytz <lukas.rytz@epfl.ch> | 2009-11-12 14:57:15 +0000 |
commit | 39fb348121e43dd3d48b378f43a68ed8fc5fc157 (patch) | |
tree | 7bdd060384e32f4c51903cc240fc9df5c37a4593 /test | |
parent | 5995692ffd9bd401589117b10029b63503cad6be (diff) | |
download | scala-39fb348121e43dd3d48b378f43a68ed8fc5fc157.tar.gz scala-39fb348121e43dd3d48b378f43a68ed8fc5fc157.tar.bz2 scala-39fb348121e43dd3d48b378f43a68ed8fc5fc157.zip |
avoid illegal forward references by moving synt...
avoid illegal forward references by moving synthetics to the beginning
of the statement-list. fixes #2489
Diffstat (limited to 'test')
-rw-r--r-- | test/files/run/names-defaults.scala | 3 |
1 files changed, 3 insertions, 0 deletions
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)) |