Skip to content

Commit a3ec2c6

Browse files
authored
Fix some typos (#14505)
1 parent 638ec9d commit a3ec2c6

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

lib/elixir/lib/module/types/descr.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3472,7 +3472,7 @@ defmodule Module.Types.Descr do
34723472
empty_s1_diff = empty?(s1_diff)
34733473

34743474
cond do
3475-
# if fst is a subtype of s1, the disjointness invariant ensures we can
3475+
# if fst is a subtype of s1, the disjointedness invariant ensures we can
34763476
# add those two pairs and end the recursion
34773477
empty_fst_diff and empty_s1_diff ->
34783478
[{x, union(snd, s2)} | pairs ++ acc]

lib/elixir/lib/module/types/helpers.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ defmodule Module.Types.Helpers do
165165
defp collect_var_traces(parent_expr, traces) do
166166
traces
167167
|> Enum.reject(fn {expr, _file, type} ->
168-
# As an otimization do not care about dynamic terms
168+
# As an optimization do not care about dynamic terms
169169
type == %{dynamic: :term} or expr == parent_expr
170170
end)
171171
|> case do

lib/elixir/lib/protocol.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,9 +280,9 @@ defmodule Protocol do
280280
type_args = :lists.map(fn _ -> quote(do: term) end, :lists.seq(2, arity))
281281
type_args = [quote(do: t) | type_args]
282282

283-
varify = fn pos -> Macro.var(String.to_atom("arg" <> Integer.to_string(pos)), __MODULE__) end
283+
to_var = fn pos -> Macro.var(String.to_atom("arg" <> Integer.to_string(pos)), __MODULE__) end
284284

285-
call_args = :lists.map(varify, :lists.seq(2, arity))
285+
call_args = :lists.map(to_var, :lists.seq(2, arity))
286286
call_args = [quote(do: term) | call_args]
287287

288288
quote generated: true do

lib/elixir/lib/regex.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -947,7 +947,7 @@ defmodule Regex do
947947
defp embeddable_modifiers([], acc, []), do: {:ok, acc}
948948
defp embeddable_modifiers([], acc, err), do: {:error, acc, err}
949949

950-
# translate modifers to options
950+
# translate modifiers to options
951951

952952
defp translate_options(<<?s, t::binary>>, acc),
953953
do: translate_options(t, [:dotall, {:newline, :anycrlf} | acc])

0 commit comments

Comments
 (0)