Skip to content

Commit ef96336

Browse files
committed
Add regression tests for dialyzer opacity
1 parent 2fc3424 commit ef96336

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,10 @@ defmodule Dialyzer.Regressions do
1515
def eex_eval_opts do
1616
EEx.eval_string("foo <%= bar %>", [bar: "baz"], trim: true)
1717
end
18+
19+
@spec inlined_map_set :: MapSet.t(integer())
20+
def inlined_map_set, do: MapSet.new([1, 2])
21+
22+
@spec inlined_uri :: URI.t()
23+
def inlined_uri, do: URI.new!("example.com")
1824
end

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ defmodule Kernel.DialyzerTest do
3131
:elixir,
3232
:elixir_env,
3333
:elixir_erl_pass,
34+
:inet,
3435
:maps,
3536
:sets,
3637
ArgumentError,
@@ -53,7 +54,8 @@ defmodule Kernel.DialyzerTest do
5354
String,
5455
String.Chars,
5556
Task,
56-
Task.Supervisor
57+
Task.Supervisor,
58+
URI
5759
]
5860

5961
files = Enum.map(mods, &:code.which/1)

0 commit comments

Comments
 (0)