We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6c7f6e7 commit 4f0b0d9Copy full SHA for 4f0b0d9
lib/elixir/lib/protocol.ex
@@ -1104,8 +1104,7 @@ defmodule Protocol do
1104
1105
# TODO: Make this an error on Elixir v2.0
1106
if for != Any and not Keyword.has_key?(built_in(), for) and for != env.module and
1107
- for not in env.context_modules and
1108
- not Code.ensure_loaded?(for) do
+ for not in env.context_modules and Code.ensure_compiled(for) != {:module, for} do
1109
IO.warn(
1110
"you are implementing a protocol for #{inspect(for)} but said module is not available. " <>
1111
"Make sure the module name is correct. If #{inspect(for)} is an optional dependency, " <>
0 commit comments