summaryrefslogtreecommitdiff
path: root/test/files/run/promotion.scala
blob: 82b5265143f80eb0effa32150428777658289062 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
/** Test that unboxing and promotion (from int to double) work together.
 *  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
    }});
  }
}