Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unresolved aliases #160

Closed
marcandre opened this issue Oct 17, 2022 · 0 comments · Fixed by #167
Closed

Unresolved aliases #160

marcandre opened this issue Oct 17, 2022 · 0 comments · Fixed by #167

Comments

@marcandre
Copy link
Contributor

Thanks for looking at #154 so quickly ❤️

I'm afraid the issue isn't completely solved though. If the module in question is aliased, it still does not work:

defmodule EmptyMix.Example do
  alias EmptyMix.Example
  defstruct [:name]
  use TypeCheck, enable_runtime_checks: Mix.env() != :prod
  @type! t :: %__MODULE__{name: String.t()}

  @spec! hydrate(%{String.t() => any} | Example.t()) :: Example.t()
  def hydrate(%__MODULE__{} = struct), do: struct
end
$ mix compile
** (UndefinedFunctionError) function EmptyMix.Example.t/0 is undefined (function not available)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant