summaryrefslogtreecommitdiff
path: root/test/files/run/MeterCaseClass.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2012-09-20 09:53:39 -0700
committerPaul Phillips <paulp@improving.org>2012-09-20 09:53:39 -0700
commit3136e53e0ce4d73e1d2b3e8d043fff7892b2f439 (patch)
tree69e6e4c21241e174942bce493aec289b46a6dce9 /test/files/run/MeterCaseClass.scala
parentd834d90d88e1dab6a8621b13c9d4b64d3417a94e (diff)
parentd87592da76eb555f0e3fc3732169e56b1852fba1 (diff)
downloadscala-3136e53e0ce4d73e1d2b3e8d043fff7892b2f439.tar.gz
scala-3136e53e0ce4d73e1d2b3e8d043fff7892b2f439.tar.bz2
scala-3136e53e0ce4d73e1d2b3e8d043fff7892b2f439.zip
Merge branch 'pull-1352-reformatted' into 2.10.x
# By Martin Odersky * pull-1352-reformatted: Disabled failing build manager tests. New test case for SI-6337 New test case for closing SI-6385 Value classes: eliminated half-boxing Cleanup of OverridingPairs Fixes SI-6260
Diffstat (limited to 'test/files/run/MeterCaseClass.scala')
-rw-r--r--test/files/run/MeterCaseClass.scala6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/files/run/MeterCaseClass.scala b/test/files/run/MeterCaseClass.scala
index e5979cf761..18f8e23f89 100644
--- a/test/files/run/MeterCaseClass.scala
+++ b/test/files/run/MeterCaseClass.scala
@@ -2,7 +2,7 @@ package a {
case class Meter(underlying: Double) extends AnyVal with _root_.b.Printable {
def + (other: Meter): Meter =
new Meter(this.underlying + other.underlying)
- def / (other: Meter): Double = this.underlying / other.underlying
+ def / (other: Meter)(implicit dummy: Meter.MeterArg = null): Double = this.underlying / other.underlying
def / (factor: Double): Meter = new Meter(this.underlying / factor)
def < (other: Meter): Boolean = this.underlying < other.underlying
def toFoot: Foot = new Foot(this.underlying * 0.3048)
@@ -11,6 +11,8 @@ package a {
object Meter extends (Double => Meter) {
+ private[a] trait MeterArg
+
implicit val boxings = new BoxingConversions[Meter, Double] {
def box(x: Double) = new Meter(x)
def unbox(m: Meter) = m.underlying
@@ -77,7 +79,7 @@ object Test extends App {
println(m)
foo(arr)
}
- //
+ //
// { println("testing wrapped arrays")
// import collection.mutable.FlatArray
// val arr = FlatArray(x, y + x)