From 9a9135e2cdff3741024a344a738c56ad5d33ce68 Mon Sep 17 00:00:00 2001 From: Lukasz Samson Date: Thu, 16 Apr 2026 11:41:51 +0200 Subject: [PATCH] Do not reset quote level on calls in `has_unquotes/2` The bug was introduced in 146fb4e3fffa61815babfd5c2b18d4fd16960691 --- lib/elixir/src/elixir_quote.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/elixir/src/elixir_quote.erl b/lib/elixir/src/elixir_quote.erl index b05eeab7a45..5ed87b2baf4 100644 --- a/lib/elixir/src/elixir_quote.erl +++ b/lib/elixir/src/elixir_quote.erl @@ -55,7 +55,7 @@ end; has_unquotes({{'.', _, [_, unquote]}, _, [_]}, _) -> true; has_unquotes({Var, _, Ctx}, _) when is_atom(Var), is_atom(Ctx) -> false; has_unquotes({Name, _, Args}, QuoteLevel) when is_list(Args) -> - has_unquotes(Name) orelse lists:any(fun(Child) -> has_unquotes(Child, QuoteLevel) end, Args); + has_unquotes(Name, QuoteLevel) orelse lists:any(fun(Child) -> has_unquotes(Child, QuoteLevel) end, Args); has_unquotes({Left, Right}, QuoteLevel) -> has_unquotes(Left, QuoteLevel) orelse has_unquotes(Right, QuoteLevel); has_unquotes(List, QuoteLevel) when is_list(List) ->