summaryrefslogtreecommitdiff
path: root/test/files/pos/z1720.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2012-09-10 07:37:40 -0700
committerPaul Phillips <paulp@improving.org>2012-09-12 20:47:39 -0700
commit7a44282d130937e0f6f6c8d19bea08f466a0d2e9 (patch)
tree054d2a01741512b065e614605e8cd9a0034e0992 /test/files/pos/z1720.scala
parentc168c69e8614f701b6c89e01bdd38a54e154e9cd (diff)
downloadscala-7a44282d130937e0f6f6c8d19bea08f466a0d2e9.tar.gz
scala-7a44282d130937e0f6f6c8d19bea08f466a0d2e9.tar.bz2
scala-7a44282d130937e0f6f6c8d19bea08f466a0d2e9.zip
Test case for a bug fixed in M7.
Diffstat (limited to 'test/files/pos/z1720.scala')
-rw-r--r--test/files/pos/z1720.scala16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/files/pos/z1720.scala b/test/files/pos/z1720.scala
new file mode 100644
index 0000000000..7394d428c1
--- /dev/null
+++ b/test/files/pos/z1720.scala
@@ -0,0 +1,16 @@
+package test
+
+class Thing {
+ def info: Info[this.type] = InfoRepository.getInfo(this)
+ def info2: Info[this.type] = {
+ def self: this.type = this
+ InfoRepository.getInfo(self)
+ }
+}
+
+trait Info[T]
+case class InfoImpl[T](thing: T) extends Info[T]
+
+object InfoRepository {
+ def getInfo(t: Thing): Info[t.type] = InfoImpl(t)
+}