summaryrefslogtreecommitdiff
path: root/test/files
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2012-04-23 08:25:17 -0700
committerPaul Phillips <paulp@improving.org>2012-04-23 08:25:17 -0700
commitb0ed33a2a2902aa10b20060c97d144cb07297635 (patch)
treebf442c1046184f0ce9afc42bce3863bf8bebda53 /test/files
parentf47f0c9708b9276eaa658f9f24f73d8431e227d3 (diff)
parent72052b6070cf602b3b84f1ec41df332860e93c3c (diff)
downloadscala-b0ed33a2a2902aa10b20060c97d144cb07297635.tar.gz
scala-b0ed33a2a2902aa10b20060c97d144cb07297635.tar.bz2
scala-b0ed33a2a2902aa10b20060c97d144cb07297635.zip
Merge commit 'refs/pull/425/head' into develop
Diffstat (limited to 'test/files')
-rw-r--r--test/files/jvm/si5471.check2
-rw-r--r--test/files/jvm/si5471.scala17
2 files changed, 19 insertions, 0 deletions
diff --git a/test/files/jvm/si5471.check b/test/files/jvm/si5471.check
new file mode 100644
index 0000000000..bb101b641b
--- /dev/null
+++ b/test/files/jvm/si5471.check
@@ -0,0 +1,2 @@
+true
+true
diff --git a/test/files/jvm/si5471.scala b/test/files/jvm/si5471.scala
new file mode 100644
index 0000000000..2c8c4205c5
--- /dev/null
+++ b/test/files/jvm/si5471.scala
@@ -0,0 +1,17 @@
+
+object Test {
+
+ def main(args: Array[String]) {
+ import scala.math.Numeric
+ import scala.math.Numeric.Implicits._
+
+ val b = BigInt(Long.MaxValue) + 1
+
+ def dbl[N :Numeric](n: N) = n.toDouble
+ def flt[N :Numeric](n: N) = n.toFloat
+
+ println(dbl(b) == b.toDouble)
+ println(flt(b) == b.toFloat)
+ }
+
+}