From 182dd24fed2261ec73fac6f7ea5d3f156c82d540 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Tue, 27 Feb 2024 12:30:06 +0100 Subject: [PATCH] Do not assume abstract code is available --- lib/ex_doc/language/elixir.ex | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/ex_doc/language/elixir.ex b/lib/ex_doc/language/elixir.ex index 62673391c..c32d42d35 100644 --- a/lib/ex_doc/language/elixir.ex +++ b/lib/ex_doc/language/elixir.ex @@ -453,7 +453,8 @@ defmodule ExDoc.Language.Elixir do def get_impls(module) do for behaviour <- behaviours_implemented_by(module), - {callback, _} <- Source.get_callbacks(Source.get_abstract_code(behaviour), ""), + abstract_code = Source.get_abstract_code(behaviour), + {callback, _} <- Source.get_callbacks(abstract_code, ""), do: {callback, behaviour}, into: %{} end