Skip to content

Commit 26b3e49

Browse files
committed
still needs to be marked,
since we are going to drop those attribute, we need know if it is used or not
1 parent 1fe56c1 commit 26b3e49

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

jscomp/ext/literals.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ let fn_method = "fn_method"
6161
let fn_mk = "fn_mk"
6262
(*let js_fn_runmethod = "js_fn_runmethod"*)
6363

64-
let bs_deriving = "bs.deriving"
64+
6565
let bs_deriving_dot = "bs.deriving."
6666

6767

jscomp/syntax/ast_attributes.ml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,13 @@ let external_needs_to_be_encoded (attrs : t)=
136136

137137
let is_inline : attr -> bool =
138138
(fun
139-
({txt;},_) ->
140-
txt = "bs.inline" || txt = "inline"
141-
)
139+
(({txt;},_) as attr) ->
140+
let b = txt = "bs.inline" || txt = "inline" in
141+
(if b then
142+
Bs_ast_invariant.mark_used_bs_attribute attr);
143+
b
144+
) (* still needs to be marked, since we are going to drop it right now *)
145+
142146
let has_inline_in_stru (attrs : t) : bool =
143147
Ext_list.exists attrs is_inline
144148

0 commit comments

Comments
 (0)