diff options
author | Martin Odersky <odersky@gmail.com> | 2012-09-19 17:37:24 +0200 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2012-09-20 09:41:34 -0700 |
commit | c7204787b48166b5dee6215525f69ae615535c5a (patch) | |
tree | d32e246f0530a4d4aac758db81ee383baf3735cb /test/files | |
parent | d435f72e5fb7fe6486c881e7dd1bdca3743f42d4 (diff) | |
download | scala-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')
-rw-r--r-- | test/files/run/t6337a.scala | 16 |
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) +} |