Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unused WeakTypeTag constraint #410

Merged
merged 1 commit into from
Mar 26, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

package org.typelevel.log4cats.slf4j.internal

import scala.annotation.{nowarn, tailrec}
import scala.annotation.tailrec
import scala.reflect.macros.blackbox

/**
Expand All @@ -45,13 +45,12 @@ import scala.reflect.macros.blackbox
*/
private[slf4j] class GetLoggerMacros(val c: blackbox.Context) {

final def safeCreateImpl[F: c.WeakTypeTag](f: c.Expr[F]) = getLoggerImpl[F](f, true)
final def safeCreateImpl[F](f: c.Expr[F]) = getLoggerImpl[F](f, true)

final def unsafeCreateImpl[F: c.WeakTypeTag](f: c.Expr[F]) = getLoggerImpl[F](f, false)
final def unsafeCreateImpl[F](f: c.Expr[F]) = getLoggerImpl[F](f, false)

/** Get a logger by reflecting the enclosing class name. */
@nowarn("cat=unused")
private def getLoggerImpl[F: c.WeakTypeTag](f: c.Expr[F], delayed: Boolean) = {
private def getLoggerImpl[F](f: c.Expr[F], delayed: Boolean) = {
import c.universe._

@tailrec def findEnclosingClass(sym: c.universe.Symbol): c.universe.Symbol = {
Expand Down