summaryrefslogtreecommitdiff
path: root/test/files/neg/literals.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/neg/literals.scala')
-rw-r--r--test/files/neg/literals.scala13
1 files changed, 12 insertions, 1 deletions
diff --git a/test/files/neg/literals.scala b/test/files/neg/literals.scala
index 3df7f0b408..22d5d9acd1 100644
--- a/test/files/neg/literals.scala
+++ b/test/files/neg/literals.scala
@@ -1,6 +1,6 @@
/* This took me literally all day.
-*/
+ */
trait RejectedLiterals {
def missingHex: Int = { 0x } // line 4: was: not reported, taken as zero
@@ -34,3 +34,14 @@ trait Braceless {
def noHexFloat: Double = 0x1.2 // line 34: ';' expected but double literal found.
}
+
+trait MoreSadness {
+
+ def tooTiny: Float = { 0.7e-45f } // floating point number too small
+
+ def twoTiny: Double = { 2.0e-324 } // double precision floating point number too small
+
+ def tooHuge: Float = { 3.4028236E38f } // floating point number too large
+
+ def twoHuge: Double = { 1.7976931348623159e308 } // double precision floating point number too large
+}