Skip to content
Closed
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Removed comments
  • Loading branch information
aparo committed Aug 12, 2019
commit a117913b2160b7ef365b705ae18ccf999f2c569a
Original file line number Diff line number Diff line change
Expand Up @@ -358,10 +358,8 @@ class DerivationMacros(val c: blackbox.Context) extends ScalaVersionCompat {
): c.Expr[Decoder[T]] = {
val tpe = weakTypeOf[T]

// Valid only in macro!!
val globalUseDefaults: Boolean = extractUseDefaults(useDefaults.tree)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure about the name here. In what sense is it global?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll rename in useDefaults



def transformName(name: String): Tree =
nameTransformation.fold[Tree](q"$name")(f => q"$f($name)")

Expand Down Expand Up @@ -709,8 +707,6 @@ class DerivationMacros(val c: blackbox.Context) extends ScalaVersionCompat {
case s: String if s.contains("withTypeDiscriminator") =>
Discriminator.TypeDiscriminator
case _ =>
// print(showRaw(tree))
// print(tree)
Discriminator.default
}
}
Expand Down