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

Espec tests: TypeClassSpec.MoreProps.Proto is not a behaviour #43

Open
asmodehn opened this issue May 25, 2021 · 2 comments
Open

Espec tests: TypeClassSpec.MoreProps.Proto is not a behaviour #43

asmodehn opened this issue May 25, 2021 · 2 comments

Comments

@asmodehn
Copy link

I ran the espec test on my setup (elixir 1.11), and, mostly as a way to slowly understand the code, I would like to address one of the warnings I got:

warning: module TypeClassSpec.MoreProps.Proto is not a behaviour (in module TypeClassSpec.MoreProps.Proto.Integer)
  spec/type_class_spec.exs:82: TypeClassSpec.MoreProps.Proto.Integer (module)

This refers to this line. I also have this warning quite a few times when building witchcraft.

The Adder class doesn't trigger this warning, so it seems to be because there is no where section in the definition of MoreProps class... or because extend is not working as expected ? I'm guessing it should declare the protocol for this class, from the where section of the extended module somehow ?

Thanks for any info about this.

@QuinnWilton
Copy link
Member

Hi there! Thank you so much for the report. I dove into this a little bit today, and it actually looks like it's a result of some upstream behaviour in the Elixir compiler. I've opened up a fix on Elixir that you can track using the above pull request :)

@cognivore
Copy link

@QuinnWilton thanks for the patch (and tolerating anti-FP toxicity of Elixir developers). I'll incorporate it in my patchset for Goo (a FP-friendly Elixir fork). In the meantime I patched it by injecting a phony function in each defclass and definst :D

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

No branches or pull requests

3 participants