Generate an error if a number literal is too large to be represented with the Num class.

This commit is contained in:
Gavin Schulz
2015-03-03 00:07:55 -08:00
parent 794d09ef15
commit 0ec31433c8
5 changed files with 29 additions and 7 deletions
+2
View File
@@ -0,0 +1,2 @@
var x = "999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999"
var y = Num.fromString(x) // expect runtime error: Number literal is too large.