In scala when compiling with -Ywarn-unused, implicit parameters are marked as never used even if they are used in implicit scope.
For example
class MyClass(implicit: ec: ExecutionContext) { def fun = Future.successful("hi").map(_.length) } This is problematic when running with -Xfatal-warnings as well.
Is there a way to hint to the compiler that these parameters are in fact used? If not, is there another way to ensure code won't compile with unused parameters and declarations?
FutureneedExecutionContext. Try replacingsuccessfulwithFuture.apply.