From 378e38025ef6b029016e7a4fe34dc260accd44df Mon Sep 17 00:00:00 2001 From: sabiwara Date: Mon, 14 Oct 2024 10:05:06 +0900 Subject: [PATCH 1/2] Fix warning when dbg with/1 with catch-all clause --- lib/elixir/lib/macro.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/elixir/lib/macro.ex b/lib/elixir/lib/macro.ex index 053a8fd9369..e037e57271a 100644 --- a/lib/elixir/lib/macro.ex +++ b/lib/elixir/lib/macro.ex @@ -2731,7 +2731,7 @@ defmodule Macro do end) error_clause = - quote do + quote generated: true do {other, _acc} -> raise WithClauseError, term: other end From 99929ad272b8cb9c318e97ec0152f528c80dc12d Mon Sep 17 00:00:00 2001 From: sabiwara Date: Mon, 14 Oct 2024 10:06:01 +0900 Subject: [PATCH 2/2] Mention with/1 in dbg changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f36962589ab..a8408bcf57f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,7 +27,7 @@ TODO. * [Kernel] Now verify the type of the binary generators * [Kernel] Track the type of tuples in patterns and inside `elem/2` * [List] Add `List.ends_with?/2` - * [Macro] Improve `dbg` handling of `if/2` and of code blocks + * [Macro] Improve `dbg` handling of `if/2`, `with/1` and of code blocks * [Process] Handle arbitrarily high integer values in `Process.sleep/1` * [String] Inspect special whitespace and zero-width characters using their Unicode representation