Open gvolpe opened 4 years ago
Hey @gvolpe Thanks for the issue!
Yeah, it does use null
as a rhs of value F
(or whatever the type parameter is called).
It was a trick to avoid the allocation of a new object.
Something like this:
trait E {}
val F: E = null
E
type serves as a tag so F
value can later be converted to an instance of Functor[F]
(or whatever the context is).
I don't see a straightforward solution to keep the zero allocation cost without using null
.
Maybe I can use something else for tagging F
value. 🤔
I will play with it and get back to you with that.
Sorry for the delay in getting back to you. If there's a way to use WartRemover's Null
while ignoring code generated by Context Applied that would work for me too :smile:
I don't know if this is possible, though... :thinking:
It's a bit of a hack but what about just including @SuppressWarnings(Array("org.wartremover.warts.All"))
on all code generated by context-applied
?
I have this error when trying to use
context-applied
in a project that uses theNull
wart.I guess the plugin generates some
null
values? Using the latest version0.1.4
.