diff options
author | Lukas Rytz <lukas.rytz@epfl.ch> | 2010-04-09 09:51:00 +0000 |
---|---|---|
committer | Lukas Rytz <lukas.rytz@epfl.ch> | 2010-04-09 09:51:00 +0000 |
commit | 3cc8af6179ac7b1778c19d96bfacd01120407d26 (patch) | |
tree | feeee3d60e12ff29a9c408a2746c3d460968a81b /test/files/run | |
parent | 82deaa1e794fbdadf2c60f206966797bcd9f9ca1 (diff) | |
download | scala-3cc8af6179ac7b1778c19d96bfacd01120407d26.tar.gz scala-3cc8af6179ac7b1778c19d96bfacd01120407d26.tar.bz2 scala-3cc8af6179ac7b1778c19d96bfacd01120407d26.zip |
close #3207. review by odersky
Diffstat (limited to 'test/files/run')
-rw-r--r-- | test/files/run/names-defaults.scala | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/files/run/names-defaults.scala b/test/files/run/names-defaults.scala index 8557047875..3442ecafc3 100644 --- a/test/files/run/names-defaults.scala +++ b/test/files/run/names-defaults.scala @@ -304,6 +304,27 @@ object Test extends Application { } + // #3207 + trait P3207[T] { + class Inner(val f: T => Unit = (x: T) => println(x)) + } + + object Test3207_1 { + val p = new P3207[Int] {} + val q = new p.Inner() { + def g = 0 + } + } + + object Test3207_2 { + val p = new P3207[Int] { + val inner = new Inner() { + def g = 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)) |