aboutsummaryrefslogtreecommitdiff
path: root/test/snippets/number-literal-bug.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/snippets/number-literal-bug.js')
-rw-r--r--test/snippets/number-literal-bug.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/snippets/number-literal-bug.js b/test/snippets/number-literal-bug.js
new file mode 100644
index 000000000..cb6990348
--- /dev/null
+++ b/test/snippets/number-literal-bug.js
@@ -0,0 +1,11 @@
+// test that we don't call functions on number literals
+export function test() {
+ const precision = 10;
+ try {
+ parseFloat((0.0).toPrecision(precision) + "1");
+ } catch (exception) {
+ throw new Error("Test Failed", exception);
+ }
+
+ testDone(import.meta.url);
+}