summaryrefslogtreecommitdiff
path: root/test/files/jvm
diff options
context:
space:
mode:
authorVojin Jovanovic <vojin.jovanovic@epfl.ch>2012-04-23 13:15:13 +0200
committerVojin Jovanovic <vojin.jovanovic@epfl.ch>2012-04-23 13:15:13 +0200
commit72052b6070cf602b3b84f1ec41df332860e93c3c (patch)
treeb9d676e7cc41a5de4bf9f74b1458ad8f867ae193 /test/files/jvm
parent8c95273b70288e4e3a547fa43f2dbdb40a71b9ea (diff)
downloadscala-72052b6070cf602b3b84f1ec41df332860e93c3c.tar.gz
scala-72052b6070cf602b3b84f1ec41df332860e93c3c.tar.bz2
scala-72052b6070cf602b3b84f1ec41df332860e93c3c.zip
Fix for SI-5471
Diffstat (limited to 'test/files/jvm')
-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)
+ }
+
+}