Cannot use `^variable` outside of match clauses

This error disappears when you add import Ash.Query but then Elixir complains that it is an unneeded import, is there a better way around this?
3 Replies
ZachDaniel
ZachDaniel3y ago
You want require Ash.Query if you are calling Ash.Query.filter/2 🙂 import Ash.Query would make all the functions available, i.e filter/2 The reason it works is because import Module is an implicit require Module as well.
harry
harryOP3y ago
Thanks 🙌🏼
ZachDaniel
ZachDaniel3y ago
npnp

Did you find this page helpful?