Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion lib/elixir/lib/file/stream.ex
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,13 @@ defmodule File.Stream do

defstruct path: nil, modes: [], line_or_bytes: :line, raw: true, node: nil

@type t :: %__MODULE__{}
@type t :: %__MODULE__{
path: Path.t(),
modes: [term()],
line_or_bytes: :line | pos_integer(),
raw: boolean(),
node: node()
}

@doc false
def __build__(path, line_or_bytes, modes) do
Expand Down
4 changes: 2 additions & 2 deletions lib/elixir/lib/macro/env.ex
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ defmodule Macro.Env do
Returns a keyword list containing the file and line
information as keys.
"""
@spec location(t) :: keyword
@spec location(t) :: [file: file, line: line]
def location(env)

def location(%{__struct__: Macro.Env, file: file, line: line}) do
Expand Down Expand Up @@ -700,7 +700,7 @@ defmodule Macro.Env do
@doc """
Returns the environment stacktrace.
"""
@spec stacktrace(t) :: list
@spec stacktrace(t) :: [{module, atom, arity, keyword}]
def stacktrace(%{__struct__: Macro.Env} = env) do
cond do
is_nil(env.module) ->
Expand Down
2 changes: 1 addition & 1 deletion lib/elixir/lib/map.ex
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ defmodule Map do
%{}

"""
@spec new :: map
@spec new :: %{}
def new, do: %{}

@doc """
Expand Down
2 changes: 1 addition & 1 deletion lib/elixir/lib/module.ex
Original file line number Diff line number Diff line change
Expand Up @@ -754,7 +754,7 @@ defmodule Module do

"""
@doc since: "1.12.0"
@spec reserved_attributes() :: map
@spec reserved_attributes() :: %{optional(atom()) => %{doc: binary()}}
def reserved_attributes() do
%{
after_compile: %{
Expand Down
2 changes: 1 addition & 1 deletion lib/logger/lib/logger.ex
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ defmodule Logger do
"""

@type level ::
:emergency | :alert | :critical | :error | :warning | :warn | :notice | :info | :debug
:emergency | :alert | :critical | :error | :warning | :notice | :info | :debug
@type report :: map() | keyword()
@type message :: :unicode.chardata() | String.Chars.t() | report()
@type metadata :: keyword()
Expand Down
Loading