diff --git a/biome.json b/biome.json index bee01bd683..deaf83da15 100644 --- a/biome.json +++ b/biome.json @@ -13,7 +13,6 @@ "rules": { "recommended": true, "complexity": { - "noUselessSwitchCase": "off", "noUselessTernary": "off", "useArrowFunction": "off", "useOptionalChain": "off" diff --git a/runtime/compare.js b/runtime/compare.js index 5812fc09f0..b81b00639c 100644 --- a/runtime/compare.js +++ b/runtime/compare.js @@ -236,8 +236,7 @@ function caml_compare_val(a, b, total) { if (a > b) return 1; } break; - case 246: // Lazy_tag - default: // Block with other tag + default: // Lazy_tag or Block with other tag if (caml_is_continuation_tag(tag_a)) { caml_invalid_argument("compare: continuation value"); break; diff --git a/runtime/internalMod.js b/runtime/internalMod.js index 1722b728cc..bf09932850 100644 --- a/runtime/internalMod.js +++ b/runtime/internalMod.js @@ -60,13 +60,10 @@ function caml_CamlinternalMod_init_mod(loc, shape) { //Version: < 4.13 function caml_CamlinternalMod_update_mod(shape, real, x) { if (typeof shape === "number") - switch (shape) { - case 0: //function - case 1: //lazy - case 2: //class - default: - caml_update_dummy(real, x); - } + //function + //lazy + //class + caml_update_dummy(real, x); else switch (shape[0]) { case 0: //module @@ -123,13 +120,10 @@ function caml_CamlinternalMod_init_mod(loc, shape, cont) { function caml_CamlinternalMod_update_mod(shape, real, x, cont) { function loop(shape, real, x) { if (typeof shape === "number") - switch (shape) { - case 0: //function - case 1: //lazy - case 2: //class - default: - caml_update_dummy(real, x); - } + //function + //lazy + //class + caml_update_dummy(real, x); else switch (shape[0]) { case 0: //module diff --git a/runtime/marshal.js b/runtime/marshal.js index f6eca871cc..27e57a86e5 100644 --- a/runtime/marshal.js +++ b/runtime/marshal.js @@ -608,7 +608,11 @@ function caml_marshal_data_size(s, ofs) { ); } break; - case 0x8495a6bf: /* Intext_magic_number_big */ + case 0x8495a6bf /* Intext_magic_number_big */: + caml_failwith( + "Marshal.data_size: object too large to be read back on a 32-bit platform", + ); + break; default: caml_failwith("Marshal.data_size: bad object"); break;