diff options
author | Guillaume Martres <smarter@ubuntu.com> | 2017-02-01 22:48:07 +0100 |
---|---|---|
committer | Guillaume Martres <smarter@ubuntu.com> | 2017-02-01 22:48:34 +0100 |
commit | ab32f4c42d10e830a4d61e50099b03894db78bbe (patch) | |
tree | 9330dcab49065f763b632e94b3045bf4deea860f /tests/untried/neg | |
parent | 6e8933ccc40bbfe1a92c32c2d8314fd6facef12a (diff) | |
download | dotty-ab32f4c42d10e830a4d61e50099b03894db78bbe.tar.gz dotty-ab32f4c42d10e830a4d61e50099b03894db78bbe.tar.bz2 dotty-ab32f4c42d10e830a4d61e50099b03894db78bbe.zip |
Fix #1644: Disallow inner classes in value classes
Diffstat (limited to 'tests/untried/neg')
-rw-r--r-- | tests/untried/neg/valueclasses-impl-restrictions.scala | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/tests/untried/neg/valueclasses-impl-restrictions.scala b/tests/untried/neg/valueclasses-impl-restrictions.scala deleted file mode 100644 index f0577a94a..000000000 --- a/tests/untried/neg/valueclasses-impl-restrictions.scala +++ /dev/null @@ -1,29 +0,0 @@ -class M(val t: Int) extends AnyVal { - def lazyString = { - object X - () => X - } -} - -class X1(val s: String) extends AnyVal { - trait I2 { - val q: String - def z = s + q - } - - def y(x: X1) = { - val i2 = new I2 { val q = x.s } // allowed as of SI-7571 - i2.z - - { case x => x } : PartialFunction[Int, Int] // allowed - } -} - -class X2(val s: String) extends AnyVal { - private[this] class I2(val q: String) - - def y(i: Int) = { - val i2 = new I2(i.toString) - i2.q + s - } -} |