diff options
author | Paul Phillips <paulp@improving.org> | 2010-10-04 06:22:31 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2010-10-04 06:22:31 +0000 |
commit | c901a0675711a92ff714cfc909013a67a88c0ca3 (patch) | |
tree | 01e73b483cf3e372a0d7be0dab7edf7f2086b1d7 /test/pending/run/t3609.scala | |
parent | a7fd7d6dc257e396cf2cf22a9e0a60c3ce44a992 (diff) | |
download | scala-c901a0675711a92ff714cfc909013a67a88c0ca3.tar.gz scala-c901a0675711a92ff714cfc909013a67a88c0ca3.tar.bz2 scala-c901a0675711a92ff714cfc909013a67a88c0ca3.zip |
Another batch of busywork shuffling the content...
Another batch of busywork shuffling the contents of pending around. Can
almost see some daylight. No review.
Diffstat (limited to 'test/pending/run/t3609.scala')
-rwxr-xr-x | test/pending/run/t3609.scala | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/test/pending/run/t3609.scala b/test/pending/run/t3609.scala index 262948137d..030b417044 100755 --- a/test/pending/run/t3609.scala +++ b/test/pending/run/t3609.scala @@ -3,9 +3,26 @@ object Test extends Application { class B extends A def foo(x: A, y: B) = print(1) val foo = new { - //def apply(x: B, y: A) = print(3) + // def apply(x: B, y: A) = print(3) def apply = (x: B, z: B) => print(4) } foo(new B, new B) } + +// This code prints 1. If we remove comment, then it will print 4. +// Moreover following code prints 3 (which is most strange thing): + +object Test2 extends Application { + class A + class B extends A + def foo(x: A, y: B) = print(1) + val foo = new { + def apply(x: B, y: A) = print(3) + def apply = new { + def apply = (x: B, z: B) => print(4) + } + } + + foo(new B, new B) +}
\ No newline at end of file |