From 6889ff9726f70bd9a0c87bf745b412bda5d379f2 Mon Sep 17 00:00:00 2001 From: mihaylov Date: Mon, 13 Nov 2006 12:00:30 +0000 Subject: Improved the fix and test case for bug #819 --- test/files/run/promotion.check | 6 ++++-- test/files/run/promotion.scala | 12 +++++++----- 2 files changed, 11 insertions(+), 7 deletions(-) (limited to 'test/files/run') 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)) } } -- cgit v1.2.3