aboutsummaryrefslogtreecommitdiff
path: root/integration/snippets/number-literal-bug.js
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <jarred@jarredsumner.com> 2021-11-15 15:51:39 -0800
committerGravatar Jarred Sumner <jarred@jarredsumner.com> 2021-11-15 15:51:39 -0800
commit01d1f1d258a6706b4221028ed89c58ea94e0ec69 (patch)
treed2a1387bb6e8a74221ddb46a900850b2f0f57f7f /integration/snippets/number-literal-bug.js
parent4e775d275c33ae67d583732d2c3649dc89a0002d (diff)
downloadbun-01d1f1d258a6706b4221028ed89c58ea94e0ec69.tar.gz
bun-01d1f1d258a6706b4221028ed89c58ea94e0ec69.tar.zst
bun-01d1f1d258a6706b4221028ed89c58ea94e0ec69.zip
Fix #66
embarassing!
Diffstat (limited to 'integration/snippets/number-literal-bug.js')
-rw-r--r--integration/snippets/number-literal-bug.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/integration/snippets/number-literal-bug.js b/integration/snippets/number-literal-bug.js
new file mode 100644
index 000000000..cb6990348
--- /dev/null
+++ b/integration/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);
+}