summaryrefslogtreecommitdiff
path: root/test/pending/run/t5882.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/pending/run/t5882.scala')
-rw-r--r--test/pending/run/t5882.scala14
1 files changed, 14 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")
+}