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
Hey @arjan , I'm not sure if this is elixir super bug or decorator it would be nice if you could confirm
Mix.install([ {:decorator, "~> 1.4"} ]) defmodule PrintDecorator do use Decorator.Define, print: 0 def print(body, context) do quote do IO.puts("Function called: " <> Atom.to_string(unquote(context.name))) unquote(body) end end end defmodule BehaviourTest do @callback test(number(), number()) :: number() end defmodule DefaultMod do defmacro __using__(_opts) do quote do @behaviour BehaviourTest def test(x, y) do IO.puts(DefaultMod) x + y end defoverridable BehaviourTest end end end defmodule DecorModSuper do use DefaultMod use PrintDecorator @decorate print() def test(x, y) do IO.puts(__MODULE__) super(x, y) end end
this ends up with:
# Demonstrate the implementations DecorModSuper.test(1, 2) Function called: test Elixir.DecorModSuper Elixir.DecorModSuper Elixir.DefaultMod
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hey @arjan , I'm not sure if this is elixir super bug or decorator it would be nice if you could confirm
this ends up with:
The text was updated successfully, but these errors were encountered: