diff options
Diffstat (limited to 'test/files')
-rw-r--r-- | test/files/run/promotion.check | 6 | ||||
-rw-r--r-- | test/files/run/promotion.scala | 12 |
2 files changed, 11 insertions, 7 deletions
diff --git a/test/files/run/promotion.check b/test/files/run/promotion.check index 59d4f84f5f..e769775ce7 100644 --- a/test/files/run/promotion.check +++ b/test/files/run/promotion.check @@ -1,2 +1,4 @@ -B -List(2.0) +2.0 +6.0 +20.0 +30.0 diff --git a/test/files/run/promotion.scala b/test/files/run/promotion.scala index 82b5265143..6e000c7f00 100644 --- a/test/files/run/promotion.scala +++ b/test/files/run/promotion.scala @@ -3,10 +3,12 @@ * Was bug 891. */ object Test { - def main(args:Array[String]):Unit = { - Console println - List(Pair(1,2.0)).map[double]({ x => x match { - case Pair(a, x) => Console.println("B"); x * a - }}); + + def id[A](x: A): A = x; + def main(args: Array[String]): Unit = { + Console.println(id(1) * 2.0) + Console.println(3.0 * id(2)) + Console.println(id(4.0) * 5) + Console.println(6 * id(5.0)) } } |