diff options
Diffstat (limited to 'test')
-rwxr-xr-x | test/files/pos/bug1210a.scala | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/test/files/pos/bug1210a.scala b/test/files/pos/bug1210a.scala index a349a26753..7daf7f1179 100755 --- a/test/files/pos/bug1210a.scala +++ b/test/files/pos/bug1210a.scala @@ -1,9 +1,15 @@ -object Test { - def id[T](f: T => T): T = error("bla") +// both styles of abstraction should behave the same +// related to 1210 because that bug broke the OO version below +trait OO { + abstract class Test { self => + type T - abstract class M[Settings] { - type selfType = M[Settings] - - val v: selfType = id[M.this.selfType](x => x.v) + val v: Test {type T = self.T} = self.v.v } } + +trait FP { + abstract class Test[T] { + val v: Test[T] = v.v + } +}
\ No newline at end of file |