From 7a44282d130937e0f6f6c8d19bea08f466a0d2e9 Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Mon, 10 Sep 2012 07:37:40 -0700 Subject: Test case for a bug fixed in M7. --- test/files/pos/z1720.scala | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 test/files/pos/z1720.scala (limited to 'test/files/pos') 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) +} -- cgit v1.2.3