Fix dialyzer warnings on EEx.eval_string (#14971)

This commit is contained in:
Michał Łępicki
2025-11-29 12:10:30 +01:00
committed by GitHub
parent abd73a841f
commit 31ec8cc703
3 changed files with 6 additions and 0 deletions
+1
View File
@@ -364,6 +364,7 @@ defmodule EEx do
### Helpers
defp do_eval(compiled, bindings, options) do
options = Keyword.take(options, [:file, :line, :module, :prune_binding])
{result, _} = Code.eval_quoted(compiled, bindings, options)
result
end
@@ -11,4 +11,8 @@ defmodule Dialyzer.Regressions do
migrate: true
)
end
def eex_eval_opts do
EEx.eval_string("foo <%= bar %>", [bar: "baz"], trim: true)
end
end
@@ -36,6 +36,7 @@ defmodule Kernel.DialyzerTest do
ArgumentError,
Atom,
Code,
EEx,
Enum,
Exception,
ExUnit.AssertionError,