We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e3c8c62 commit c381358Copy full SHA for c381358
compiler/ml/classify_function.ml
@@ -24,7 +24,10 @@
24
25
let rec is_obj_literal (x : _ Flow_ast.Expression.t) : bool =
26
match snd x with
27
- | Identifier (_, {name = "undefined"}) | RegExpLiteral _ -> true
+ | Identifier (_, {name = "undefined"})
28
+ | StringLiteral _ | BooleanLiteral _ | NullLiteral _ | NumberLiteral _
29
+ | BigIntLiteral _ | RegExpLiteral _ | ModuleRefLiteral _ ->
30
+ true
31
| Unary {operator = Minus; argument} -> is_obj_literal argument
32
| Object {properties} -> Ext_list.for_all properties is_literal_kv
33
| Array {elements} ->
0 commit comments