From 361e68d8df83ab8cd7555ffa71bc1865a1006d07 Mon Sep 17 00:00:00 2001 From: Rodolfo Carvalho Date: Mon, 12 Oct 2026 11:32:46 +0200 Subject: [PATCH] Remove dead `autolink_spec(nil, _opts)` In f40c2723, `ExDoc.Language.Erlang` introduced `typespec(nil, _opts)`, which violated the callback typespec (`@callback typespec(...) :: iodata()`). No callers actually passed `nil`. In 563f79ce, `typespec/2` was renamed to `autolink_spec/2` and this nil clause was carried over verbatim. It has been dead code violating the callback contract since its introduction. Assisted-by: Antigravity:Gemini 3.8 Flash --- lib/ex_doc/language/erlang.ex | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lib/ex_doc/language/erlang.ex b/lib/ex_doc/language/erlang.ex index 2ad0ff504..2fa871e27 100644 --- a/lib/ex_doc/language/erlang.ex +++ b/lib/ex_doc/language/erlang.ex @@ -203,10 +203,6 @@ defmodule ExDoc.Language.Erlang do end @impl true - def autolink_spec(nil, _opts) do - nil - end - def autolink_spec(ast, %Autolink{} = config) do {name, anno, quoted} = case ast do