Skip to content

Commit 7af1d00

Browse files
committed
More
1 parent 2a5eb30 commit 7af1d00

3 files changed

Lines changed: 6 additions & 42 deletions

File tree

lib/elixir/lib/module/types/apply.ex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1144,9 +1144,9 @@ defmodule Module.Types.Apply do
11441144
end
11451145

11461146
defp filter_domain([{args, return} | clauses], expected, acc, all_compatible?) do
1147-
case compatible?(expected, return) do
1148-
true -> filter_domain(clauses, expected, [args | acc], all_compatible?)
1149-
false -> filter_domain(clauses, expected, acc, false)
1147+
case disjoint?(return, expected) do
1148+
false -> filter_domain(clauses, expected, [args | acc], all_compatible?)
1149+
true -> filter_domain(clauses, expected, acc, false)
11501150
end
11511151
end
11521152

lib/elixir/test/elixir/kernel_test.exs

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -106,42 +106,6 @@ defmodule KernelTest do
106106

107107
assert "" =~ "abcd" == false
108108
assert "" =~ ~r/abcd/ == false
109-
110-
assert_raise FunctionClauseError, "no function clause matching in Kernel.=~/2", fn ->
111-
1234 =~ "hello"
112-
end
113-
114-
assert_raise FunctionClauseError, "no function clause matching in Kernel.=~/2", fn ->
115-
1234 =~ ~r"hello"
116-
end
117-
118-
assert_raise FunctionClauseError, "no function clause matching in Kernel.=~/2", fn ->
119-
1234 =~ ~r"hello"
120-
end
121-
122-
assert_raise FunctionClauseError, "no function clause matching in Kernel.=~/2", fn ->
123-
~r"hello" =~ "hello"
124-
end
125-
126-
assert_raise FunctionClauseError, "no function clause matching in Kernel.=~/2", fn ->
127-
~r"hello" =~ ~r"hello"
128-
end
129-
130-
assert_raise FunctionClauseError, "no function clause matching in Kernel.=~/2", fn ->
131-
:abcd =~ ~r//
132-
end
133-
134-
assert_raise FunctionClauseError, "no function clause matching in Kernel.=~/2", fn ->
135-
:abcd =~ ""
136-
end
137-
138-
assert_raise FunctionClauseError, "no function clause matching in Regex.match?/2", fn ->
139-
"abcd" =~ nil
140-
end
141-
142-
assert_raise FunctionClauseError, "no function clause matching in Regex.match?/2", fn ->
143-
"abcd" =~ :abcd
144-
end
145109
end
146110

147111
test "^" do

lib/elixir/test/elixir/module/types/pattern_test.exs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ defmodule Module.Types.PatternTest do
4545
4646
where "name" was given the type:
4747
48-
# type: dynamic()
49-
# from: types_test.ex
50-
{name, arity}
48+
# type: dynamic(atom())
49+
# from: types_test.ex:LINE-1
50+
Atom.to_charlist(name)
5151
"""
5252
end
5353

0 commit comments

Comments
 (0)