diff options
author | Grzegorz Kossakowski <grzegorz.kossakowski@gmail.com> | 2013-07-01 11:51:37 -0700 |
---|---|---|
committer | Grzegorz Kossakowski <grzegorz.kossakowski@gmail.com> | 2013-07-01 11:51:37 -0700 |
commit | 5f60f27ab34f59253b7af5251250388ca606019b (patch) | |
tree | be12d6b46b3d2ebf347fc875d49c35674e70fcc0 /test/files/run | |
parent | 7e833bcc75b382cecc4b6e8f33b8def68037af82 (diff) | |
parent | a106df12c642ed44a72d28b893f6b320e8873bcc (diff) | |
download | scala-5f60f27ab34f59253b7af5251250388ca606019b.tar.gz scala-5f60f27ab34f59253b7af5251250388ca606019b.tar.bz2 scala-5f60f27ab34f59253b7af5251250388ca606019b.zip |
Merge pull request #2694 from adriaanm/master
Merge 2.10.x into master
Diffstat (limited to 'test/files/run')
-rw-r--r-- | test/files/run/t7571.scala | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/files/run/t7571.scala b/test/files/run/t7571.scala new file mode 100644 index 0000000000..00b9695168 --- /dev/null +++ b/test/files/run/t7571.scala @@ -0,0 +1,12 @@ +class Foo(val a: Int) extends AnyVal { + def foo = { {case x => x + a}: PartialFunction[Int, Int]} + + def bar = (new {}).toString +} + +object Test extends App { + val x = new Foo(1).foo.apply(2) + assert(x == 3, x) + val s = new Foo(1).bar + assert(s.nonEmpty, s) +} |