From a81dbcd7d07efbd7e0686ad856784cb2b21168e6 Mon Sep 17 00:00:00 2001 From: Nicolas Stucki Date: Fri, 9 Jun 2017 11:09:48 +0200 Subject: [PATCH] Add test for scala.Phantom self type --- tests/run/phantom-self-1.check | 0 tests/run/phantom-self-1.scala | 14 ++++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 tests/run/phantom-self-1.check create mode 100644 tests/run/phantom-self-1.scala diff --git a/tests/run/phantom-self-1.check b/tests/run/phantom-self-1.check new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/tests/run/phantom-self-1.scala b/tests/run/phantom-self-1.scala new file mode 100644 index 000000000000..9c112ff57c96 --- /dev/null +++ b/tests/run/phantom-self-1.scala @@ -0,0 +1,14 @@ +object Test { + def main(args: Array[String]): Unit = { + Boo.any + Boo.any2 + } +} + +object Boo extends Phantom with T + +trait T { self: Phantom => + type X = self.Any + def any: X = self.assume + def any2: X = assume +}