We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
defmodule Foo do @spec x() :: integer() def x(), do: 5 def spec(), do: @spec end iex> Foo.spec() #=> nil
iex> Foo.spec() #=> [ {:spec, {:::, [line: 2], [{:x, [line: 2], nil}, {:integer, [line: 2], []}]}, {Foo, {2, 1}}} ]
The text was updated successfully, but these errors were encountered:
I was accessing @spec via Module.get_attribute(__MODULE__, :spec) in defmacro __before_compile__(_). Same observations.
@spec
Module.get_attribute(__MODULE__, :spec)
defmacro __before_compile__(_)
Sorry, something went wrong.
also would love a fix for this, my precious behaves_like is broken 😭
Same here - type-checking of foreign function interface to Elixir in Elchemy relies on it
Allow @type, @opaque, @TypeP, @SPEC, @callback, and @macrocallback to…
c190f09
… be used as module attributes (#8289) Closes #8085
No branches or pull requests
Current behavior
Expected behavior
The text was updated successfully, but these errors were encountered: