# test.ex
defmodule Deadlock do
def deadlock do
%__MODULE__{}
end
end
╰─$ elixirc test.ex
== Compilation error on file test.ex ==
** (CompileError) deadlocked waiting on module Deadlock
Compilation failed because of a deadlock between files.
The following files depended on the following modules:
test.ex => Deadlock
in IEx, where the parallel compiler is unused:
iex(1)> defmodule Deadlock do
...(1)> def deadlock do
...(1)> %__MODULE__{}
...(1)> end
...(1)> end
** (CompileError) iex:3: Deadlock.__struct__/1 is undefined, cannot expand struct Deadlock
So it seems like, in order to provide an accurate error, this is maybe a special case that needs to/should be handled by the parallel compiler?