Skip to content

Commit 04d2592

Browse files
Update diagnostic type (#12567)
for compatibility with Mix.Task.Compiler.Diagnostic struct
1 parent df521d3 commit 04d2592

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

lib/elixir/lib/code.ex

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -198,11 +198,12 @@ defmodule Code do
198198
Diagnostics returned by the compiler and code evaluation.
199199
"""
200200
@type diagnostic(severity) :: %{
201-
file: Path.t(),
202-
severity: severity,
203-
message: String.t(),
204-
position: position,
205-
stacktrace: Exception.stacktrace()
201+
required(:file) => Path.t(),
202+
required(:severity) => severity,
203+
required(:message) => String.t(),
204+
required(:position) => position,
205+
required(:stacktrace) => Exception.stacktrace(),
206+
optional(any()) => any()
206207
}
207208

208209
@typedoc "The line. 0 indicates no line."

0 commit comments

Comments
 (0)