Closed sarahgerweck closed 10 years ago
The following code fails to compile on 2.11:
class MyClass[A, B <: Iterable[A]](a: A)(implicit b: B) { val logger = org.log4s.getLogger }
(I suspect the simpler form of class MyClass[A] { val logger = getLogger } will also fail.)
class MyClass[A] { val logger = getLogger }
The error occurs because we're generating the code classOf[MyClass] instead of classOf[MyClass[_]] in the Scala 2.11 macro code.
classOf[MyClass]
classOf[MyClass[_]]
The following code fails to compile on 2.11:
(I suspect the simpler form of
class MyClass[A] { val logger = getLogger }
will also fail.)The error occurs because we're generating the code
classOf[MyClass]
instead ofclassOf[MyClass[_]]
in the Scala 2.11 macro code.