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/neg | |
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/neg')
-rw-r--r-- | test/files/neg/valueclasses-impl-restrictions.check | 8 | ||||
-rw-r--r-- | test/files/neg/valueclasses-impl-restrictions.scala | 4 |
2 files changed, 5 insertions, 7 deletions
diff --git a/test/files/neg/valueclasses-impl-restrictions.check b/test/files/neg/valueclasses-impl-restrictions.check index 63924493aa..0af9173f74 100644 --- a/test/files/neg/valueclasses-impl-restrictions.check +++ b/test/files/neg/valueclasses-impl-restrictions.check @@ -6,12 +6,8 @@ valueclasses-impl-restrictions.scala:9: error: implementation restriction: neste This restriction is planned to be removed in subsequent releases. trait I2 { ^ -valueclasses-impl-restrictions.scala:15: error: implementation restriction: nested class is not allowed in value class -This restriction is planned to be removed in subsequent releases. - val i2 = new I2 { val q = x.s } - ^ -valueclasses-impl-restrictions.scala:21: error: implementation restriction: nested class is not allowed in value class +valueclasses-impl-restrictions.scala:23: error: implementation restriction: nested class is not allowed in value class This restriction is planned to be removed in subsequent releases. private[this] class I2(val q: String) ^ -four errors found +three errors found diff --git a/test/files/neg/valueclasses-impl-restrictions.scala b/test/files/neg/valueclasses-impl-restrictions.scala index 137f3f854c..f0577a94aa 100644 --- a/test/files/neg/valueclasses-impl-restrictions.scala +++ b/test/files/neg/valueclasses-impl-restrictions.scala @@ -12,8 +12,10 @@ class X1(val s: String) extends AnyVal { } def y(x: X1) = { - val i2 = new I2 { val q = x.s } + val i2 = new I2 { val q = x.s } // allowed as of SI-7571 i2.z + + { case x => x } : PartialFunction[Int, Int] // allowed } } |