Fix dialyzer warnings on EEx.eval_string (#14971)
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user