Log4s / log4s

High-performance SLF4J wrapper for Scala.
Other
171 stars 25 forks source link

Automatic naming with higher kinded type parameter fails #18

Closed aeons closed 7 years ago

aeons commented 7 years ago
import org.log4s._
class A {
  private[this] val logger = getLogger
}
class B[T] {
  private[this] val logger = getLogger
}
class C[F[_]] {
  private[this] val logger = getLogger
}

A and B compile successfully, but C fails with an error like

[error] file:lines: ? takes no type parameters, expected: one
[error]   private[this] val logger = getLogger
[error]                              ^
[error] one error found
[error] (compile:compileIncremental) Compilation failed

If the call is changed to getLogger(classOf[C[F]]) it works as expected.

sarahgerweck commented 7 years ago

Thanks for the report @aeons: I've just released 1.4.0, which includes a fix for this issue.