-
Notifications
You must be signed in to change notification settings - Fork 30
Open
Labels
bugSomething isn't workingSomething isn't working
Description
In a complex type, when there is a module that cannot be loaded, and the types are similar (the type match stacks are the same height) the error is instead that it couldn't match the last element of the union. Possible working example:
defmodule Module1 do
@type t :: :module1
end
defmodule Module3 do
@type t :: :module3
end
defmodule Foo do
@callback foo() :: {:ok, Module1.t()} | {:ok, Module2.t()} | {:ok, Module3.t()}
def foo, do: {:ok, :nothing}
endExpected kind of error from calling protected Foo.foo/0: "Could not load Module2"
Actual kind of error from calling protected Foo.foo/0: "Could not match Module3"
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working