From 41c0b0b7b9bd5089e35e1bf32fbcb471a9c78641 Mon Sep 17 00:00:00 2001 From: Geoff Reedy Date: Tue, 20 Mar 2012 19:33:52 -0600 Subject: Fix for SI-5591. And test case for SI-5591. --- test/files/run/phantomValueClass.scala | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 test/files/run/phantomValueClass.scala (limited to 'test/files/run/phantomValueClass.scala') diff --git a/test/files/run/phantomValueClass.scala b/test/files/run/phantomValueClass.scala new file mode 100644 index 0000000000..f6509f2189 --- /dev/null +++ b/test/files/run/phantomValueClass.scala @@ -0,0 +1,10 @@ +final class Phantom[A](val s: String) extends AnyVal { + def compose(p: Phantom[A]): Phantom[A] = new Phantom[A](s+p.s) +} + +object Test extends App { + val x = new Phantom[Int]("foo") + val y = new Phantom[Int]("bar") + val z = x compose y + println(z.s) +} -- cgit v1.2.3