Skip to content

Commit 54e4e38

Browse files
committed
dead code
1 parent ff1defd commit 54e4e38

File tree

7 files changed

+15
-17
lines changed

7 files changed

+15
-17
lines changed

jscomp/core/record_attributes_check.ml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ let rec check_duplicated_labels_aux (lbls : Parsetree.label_declaration list)
8181
match lbls with
8282
| [] -> None
8383
| { pld_name = { txt } as pld_name; pld_attributes } :: rest -> (
84-
(* TODO: this operates on the parse tree and does not know about expansion *)
8584
if Set_string.mem coll txt && txt <> "..." then Some pld_name
8685
else
8786
let coll_with_lbl = Set_string.add coll txt in

jscomp/gentype/GenTypeCommon.ml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ and function_ = {
9191
and ident = {builtin: bool; name: string; typeArgs: type_ list}
9292

9393
and variant = {
94-
bsStringOrInt: bool; [@live]
9594
inherits: type_ list;
9695
noPayloads: case list;
9796
payloads: payload list;
@@ -170,9 +169,9 @@ let rec depToResolvedName (dep : dep) =
170169
| Internal resolvedName -> resolvedName
171170
| Dot (p, s) -> ResolvedName.dot s (p |> depToResolvedName)
172171

173-
let createVariant ~bsStringOrInt ~inherits ~noPayloads ~payloads ~polymorphic
172+
let createVariant ~inherits ~noPayloads ~payloads ~polymorphic
174173
~unboxed =
175-
Variant {bsStringOrInt; inherits; noPayloads; payloads; polymorphic; unboxed}
174+
Variant {inherits; noPayloads; payloads; polymorphic; unboxed}
176175

177176
let ident ?(builtin = true) ?(typeArgs = []) name =
178177
Ident {builtin; name; typeArgs}

jscomp/gentype/TranslateCoreType.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,8 +223,8 @@ and translateCoreType_ ~config ~typeVarsGen
223223
in
224224
let inherits = inheritsTranslations |> List.map (fun {type_} -> type_) in
225225
let type_ =
226-
createVariant ~bsStringOrInt:(asString || asInt) ~noPayloads ~payloads
227-
~inherits ~polymorphic:true ~unboxed:false
226+
createVariant ~noPayloads ~payloads ~inherits ~polymorphic:true
227+
~unboxed:false
228228
in
229229
let dependencies =
230230
(inheritsTranslations

jscomp/gentype/TranslateTypeDeclarations.ml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,8 @@ let traslateDeclarationKind ~config ~loc ~outputFileRelative ~resolver
196196
{payload with case})
197197
else variant.payloads
198198
in
199-
createVariant ~bsStringOrInt:false ~inherits:variant.inherits
200-
~noPayloads ~payloads ~polymorphic:true ~unboxed:false
199+
createVariant ~inherits:variant.inherits ~noPayloads ~payloads
200+
~polymorphic:true ~unboxed:false
201201
| _ -> translation.type_
202202
in
203203
{translation with type_} |> handleGeneralDeclaration
@@ -311,8 +311,8 @@ let traslateDeclarationKind ~config ~loc ~outputFileRelative ~resolver
311311
})
312312
in
313313
let variantTyp =
314-
createVariant ~bsStringOrInt:false ~inherits:[] ~noPayloads ~payloads
315-
~polymorphic:false ~unboxed:unboxedAnnotation
314+
createVariant ~inherits:[] ~noPayloads ~payloads ~polymorphic:false
315+
~unboxed:unboxedAnnotation
316316
in
317317
let resolvedTypeName = typeName |> TypeEnv.addModulePath ~typeEnv in
318318
let exportFromTypeDeclaration =

jscomp/gentype/TranslateTypeExprFromTypes.ml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ let translateConstr ~config ~paramsTranslation ~(path : Path.t) ~typeEnv =
140140
}
141141
in
142142
let variant =
143-
createVariant ~bsStringOrInt:false ~inherits:[] ~noPayloads:[]
143+
createVariant ~inherits:[] ~noPayloads:[]
144144
~payloads:
145145
[
146146
case 0 "Ok" paramTranslation1.type_;
@@ -407,8 +407,8 @@ and translateTypeExprFromTypes_ ~config ~typeVarsGen ~typeEnv
407407
|> List.map (fun label -> {label; labelJS = StringLabel label})
408408
in
409409
let type_ =
410-
createVariant ~bsStringOrInt:false ~inherits:[] ~noPayloads ~payloads:[]
411-
~polymorphic:true ~unboxed:false
410+
createVariant ~inherits:[] ~noPayloads ~payloads:[] ~polymorphic:true
411+
~unboxed:false
412412
in
413413
{dependencies = []; type_}
414414
| {noPayloads = []; payloads = [(_label, t)]; unknowns = []} ->
@@ -438,8 +438,8 @@ and translateTypeExprFromTypes_ ~config ~typeVarsGen ~typeEnv
438438
})
439439
in
440440
let type_ =
441-
createVariant ~bsStringOrInt:false ~inherits:[] ~noPayloads ~payloads
442-
~polymorphic:true ~unboxed:false
441+
createVariant ~inherits:[] ~noPayloads ~payloads ~polymorphic:true
442+
~unboxed:false
443443
in
444444
let dependencies =
445445
payloadTranslations

jscomp/gentype_tests/typescript-react-example/package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

jscomp/gentype_tests/typescript-react-example/src/Hooks.bs.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)