summaryrefslogtreecommitdiff
path: root/test/files/run
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2012-09-19 17:37:24 +0200
committerPaul Phillips <paulp@improving.org>2012-09-20 09:41:34 -0700
commitc7204787b48166b5dee6215525f69ae615535c5a (patch)
treed32e246f0530a4d4aac758db81ee383baf3735cb /test/files/run
parentd435f72e5fb7fe6486c881e7dd1bdca3743f42d4 (diff)
downloadscala-c7204787b48166b5dee6215525f69ae615535c5a.tar.gz
scala-c7204787b48166b5dee6215525f69ae615535c5a.tar.bz2
scala-c7204787b48166b5dee6215525f69ae615535c5a.zip
New test case for SI-6337
This test case shows that the variant in the comment of SI-6337 now compiles also.
Diffstat (limited to 'test/files/run')
-rw-r--r--test/files/run/t6337a.scala16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/files/run/t6337a.scala b/test/files/run/t6337a.scala
new file mode 100644
index 0000000000..f5490f5cf0
--- /dev/null
+++ b/test/files/run/t6337a.scala
@@ -0,0 +1,16 @@
+object Test {
+ def main(args: Array[String]) {
+ val x = X(XX(3))
+ assert(x.q.x.x + 9 == 13)
+ }
+}
+trait Q extends Any {
+ def x: Int
+ def inc: XX
+}
+case class X(val x: Q) extends AnyVal {
+ def q = X(x.inc)
+}
+case class XX(val x: Int) extends AnyVal with Q {
+ def inc = XX(x + 1)
+}