diff options
author | Geoff Reedy <geoff@programmer-monk.net> | 2012-03-20 19:33:52 -0600 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2012-04-06 11:57:32 -0700 |
commit | 41c0b0b7b9bd5089e35e1bf32fbcb471a9c78641 (patch) | |
tree | ada73e95ede021ed16fa92c07cc5d976cbdfd188 /test/files/run | |
parent | 19bb1732646c77e58fd63490afdca066afd5ec15 (diff) | |
download | scala-41c0b0b7b9bd5089e35e1bf32fbcb471a9c78641.tar.gz scala-41c0b0b7b9bd5089e35e1bf32fbcb471a9c78641.tar.bz2 scala-41c0b0b7b9bd5089e35e1bf32fbcb471a9c78641.zip |
Fix for SI-5591.
And test case for SI-5591.
Diffstat (limited to 'test/files/run')
-rw-r--r-- | test/files/run/phantomValueClass.check | 1 | ||||
-rw-r--r-- | test/files/run/phantomValueClass.scala | 10 |
2 files changed, 11 insertions, 0 deletions
diff --git a/test/files/run/phantomValueClass.check b/test/files/run/phantomValueClass.check new file mode 100644 index 0000000000..323fae03f4 --- /dev/null +++ b/test/files/run/phantomValueClass.check @@ -0,0 +1 @@ +foobar 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) +} |