summaryrefslogtreecommitdiff
path: root/test/files/pos
diff options
context:
space:
mode:
authorJosh Suereth <Joshua.Suereth@gmail.com>2012-09-13 06:05:27 -0700
committerJosh Suereth <Joshua.Suereth@gmail.com>2012-09-13 06:05:27 -0700
commit20f701bf504530cb12e9d24e2dd66fa42244664d (patch)
tree2d5cd89f0fad0f9adb9b01cceb3ba535f40171cd /test/files/pos
parentcfd874ac173ca8d6542921aeea60e1f5ace80b9d (diff)
parentf5e71796d5b964026f5723318d29be5b189b442e (diff)
downloadscala-20f701bf504530cb12e9d24e2dd66fa42244664d.tar.gz
scala-20f701bf504530cb12e9d24e2dd66fa42244664d.tar.bz2
scala-20f701bf504530cb12e9d24e2dd66fa42244664d.zip
Merge pull request #1296 from paulp/210-errors-and-trees
210 errors and trees
Diffstat (limited to 'test/files/pos')
-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)
+}