Skip to content

Commit 5d15496

Browse files
committed
Fix dialyzer warnings on EEx.eval_string and EEx.eval_file
1 parent abd73a8 commit 5d15496

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

lib/eex/lib/eex.ex

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,7 @@ defmodule EEx do
364364
### Helpers
365365

366366
defp do_eval(compiled, bindings, options) do
367+
options = Keyword.new(options)
367368
{result, _} = Code.eval_quoted(compiled, bindings, options)
368369
result
369370
end

lib/elixir/test/elixir/fixtures/dialyzer/regressions.ex

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,8 @@ defmodule Dialyzer.Regressions do
1111
migrate: true
1212
)
1313
end
14+
15+
def eex_eval_opts do
16+
EEx.eval_string("foo <%= bar %>", [bar: "baz"], trim: true)
17+
end
1418
end

lib/elixir/test/elixir/kernel/dialyzer_test.exs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ defmodule Kernel.DialyzerTest do
3636
ArgumentError,
3737
Atom,
3838
Code,
39+
EEx,
3940
Enum,
4041
Exception,
4142
ExUnit.AssertionError,

0 commit comments

Comments
 (0)