diff --git a/src/matching/Generic_vs_generic.ml b/src/matching/Generic_vs_generic.ml index 9c5c468135ea..e3f575d8b322 100644 --- a/src/matching/Generic_vs_generic.ml +++ b/src/matching/Generic_vs_generic.ml @@ -2238,14 +2238,14 @@ and m_stmts_deep ~inside ~less_is_ok (xsa : G.stmt list) (xsb : G.stmt list) = | ( ({ s = G.ExprStmt ({ e = G.Ellipsis _i; _ }, _); _ } :: _ as xsa), (_ :: _ as xsb) ) -> (* let's first try without going deep *) - m_list__m_stmt xsa xsb >!> fun () -> - if_config - (fun x -> x.go_deeper_stmt) - ~then_: - (match SubAST_generic.flatten_substmts_of_stmts xsb with - | None -> fail () (* was already flat *) - | Some (xsb, _UNUSED_last_stmt) -> m_list__m_stmt xsa xsb) - ~else_:(fail ()) + m_list__m_stmt xsa xsb + >||> if_config + (fun x -> x.go_deeper_stmt) + ~then_: + (match SubAST_generic.flatten_substmts_of_stmts xsb with + | None -> fail () (* was already flat *) + | Some (xsb, _UNUSED_last_stmt) -> m_list__m_stmt xsa xsb) + ~else_:(fail ()) (* dots: metavars: $...BODY *) | ( ({ s = G.ExprStmt ({ e = G.N (G.Id ((s, _), _idinfo)); _ }, _); _ } :: _ as xsa), diff --git a/tests/semgrep-rules b/tests/semgrep-rules index 5ce59a973a33..fcb9cffa7a28 160000 --- a/tests/semgrep-rules +++ b/tests/semgrep-rules @@ -1 +1 @@ -Subproject commit 5ce59a973a3388827755336c2dad1eeb73d50e2c +Subproject commit fcb9cffa7a289099d55de3d3661e9b6b360a732c