Skip to content

Commit

Permalink
Rename Reflection.Type to TypeRepr
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasstucki committed Oct 26, 2020
1 parent daa6fc0 commit 1e90e97
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ object MacroCompat {
}

def locationImpl()(using qctx: QuoteContext): Expr[Location] = {
import qctx.tasty.{_, given _}
import qctx.tasty._
val path = rootPosition.sourceFile.jpath.toString
val startLine = rootPosition.startLine + 1
'{ new Location(${Expr(path)}, ${Expr(startLine)}) }
Expand All @@ -22,9 +22,9 @@ object MacroCompat {
}

def clueImpl[T:Type](value: Expr[T])(using qctx: QuoteContext): Expr[Clue[T]] = {
import qctx.tasty.{_, given _}
import qctx.tasty._
val source = value.unseal.pos.sourceCode
val valueType = implicitly[scala.quoted.Type[T]].show
val valueType = Type[T].show
'{ new Clue(${Expr(source)}, $value, ${Expr(valueType)}) }
}

Expand Down

0 comments on commit 1e90e97

Please sign in to comment.