diff options
Diffstat (limited to 'test/files/run')
-rw-r--r-- | test/files/run/promotion.check | 2 | ||||
-rw-r--r-- | test/files/run/promotion.scala | 12 |
2 files changed, 14 insertions, 0 deletions
diff --git a/test/files/run/promotion.check b/test/files/run/promotion.check new file mode 100644 index 0000000000..59d4f84f5f --- /dev/null +++ b/test/files/run/promotion.check @@ -0,0 +1,2 @@ +B +List(2.0) diff --git a/test/files/run/promotion.scala b/test/files/run/promotion.scala new file mode 100644 index 0000000000..82b5265143 --- /dev/null +++ b/test/files/run/promotion.scala @@ -0,0 +1,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 + }}); + } +} |