Skip to content

Commit 37dc125

Browse files
committed
Check both expand and dispatch are not in stacktrace
1 parent 9fb8fb1 commit 37dc125

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

lib/elixir/test/elixir/code_test.exs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ defmodule CodeTest do
215215
end
216216
end
217217

218-
test "prunes elixir_expand from macro expansion stacktraces" do
218+
test "prunes internal modules from macro expansion stacktraces" do
219219
defmodule PruneStacktraceMacro do
220220
defmacro bad do
221221
quote do
@@ -236,7 +236,10 @@ defmodule CodeTest do
236236
CompileError -> __STACKTRACE__
237237
end
238238

239-
refute Enum.any?(stacktrace, &match?({:elixir_expand, :expand, 3, _}, &1))
239+
refute Enum.any?(
240+
stacktrace,
241+
&match?({mod, _, _, _} when mod in [:elixir_expand, :elixir_dispatch], &1)
242+
)
240243
end
241244

242245
test "warns when lexical tracker process is dead" do

0 commit comments

Comments
 (0)