diff options
author | Paul Phillips <paulp@improving.org> | 2012-10-08 07:23:24 -0700 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2012-10-08 07:23:24 -0700 |
commit | 6d6e328bfe0a458b556e91a99019c81673860db5 (patch) | |
tree | 93ddf4e9ed05e4108f1b9d82a0960c516b1c3e77 /test/pending | |
parent | 7be1652cbf1300fe5fea44681a480c33467c2296 (diff) | |
parent | a5a1f01b7d458b94e37407681abb3334a543fb03 (diff) | |
download | scala-6d6e328bfe0a458b556e91a99019c81673860db5.tar.gz scala-6d6e328bfe0a458b556e91a99019c81673860db5.tar.bz2 scala-6d6e328bfe0a458b556e91a99019c81673860db5.zip |
Merge pull request #1472 from paulp/merge-2.10
Merge 2.10
Diffstat (limited to 'test/pending')
-rw-r--r-- | test/pending/run/t5882.scala | 14 | ||||
-rw-r--r-- | test/pending/run/t6408.scala | 11 |
2 files changed, 25 insertions, 0 deletions
diff --git a/test/pending/run/t5882.scala b/test/pending/run/t5882.scala new file mode 100644 index 0000000000..47996d3068 --- /dev/null +++ b/test/pending/run/t5882.scala @@ -0,0 +1,14 @@ +// SIP-15 was revised to allow nested classes in value classes. +// This test checks that their basic functionality. + +class NodeOps(val n: Any) extends AnyVal { self => + class Foo() { def show = self.show(n) } + def show(x: Any) = x.toString +} + + +object Test extends App { + + val n = new NodeOps("abc") + assert(new n.Foo().show == "abc") +} diff --git a/test/pending/run/t6408.scala b/test/pending/run/t6408.scala new file mode 100644 index 0000000000..ff17480b35 --- /dev/null +++ b/test/pending/run/t6408.scala @@ -0,0 +1,11 @@ +class X(val i: Int) extends AnyVal { + class Inner(val q: Int) { + def plus = i + q + } +} + +object Test extends App { + val x = new X(11) + val i = new x.Inner(22) + assert(i.plus == 33) +} |