Skip to content

Commit

Permalink
Merge pull request #330 from zawodskoj/fix/macro-in-kr
Browse files Browse the repository at this point in the history
Disable macros while typechecking derivation call
  • Loading branch information
zawodskoj authored Nov 12, 2021
2 parents 6fea7cd + c45cf6a commit 96cbec9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/core/src/main/scala/derevo/Derevo.scala
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ class Derevo(val c: blackbox.Context) {
def fixFirstTypeParam = {
val nothingT = c.typeOf[Nothing]

c.typecheck(call, silent = true) match {
c.typecheck(call, silent = true, withMacrosDisabled = true) match {
case q"$method[$nothing, ..$remainingTpes](..$args)" if nothing.tpe == nothingT =>
q"$method[$outTyp, ..$remainingTpes](..$args)"
case q"$method[$nothing, ..$remainingTpes]" if nothing.tpe == nothingT =>
Expand Down

0 comments on commit 96cbec9

Please sign in to comment.