File tree Expand file tree Collapse file tree 4 files changed +11
-1
lines changed Expand file tree Collapse file tree 4 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ end Type
1212object Type :
1313
1414 /** Show a source code like representation of this type without syntax highlight */
15- def show [T ](using Type [T ])(using Quotes ): String =
15+ def show [T <: AnyKind ](using Type [T ])(using Quotes ): String =
1616 import quotes .reflect ._
1717 TypeTree .of[T ].show
1818
Original file line number Diff line number Diff line change 1+ [A >: scala.Nothing <: scala.Any] => scala.collection.immutable.List[A]
Original file line number Diff line number Diff line change 1+ import scala .quoted ._
2+
3+ inline def showList : String =
4+ $ { showListExpr }
5+
6+ private def showListExpr [T : Type ](using Quotes ): Expr [String ] =
7+ Expr (Type .show[List ])
Original file line number Diff line number Diff line change 1+ @ main def Test =
2+ println(showList)
You can’t perform that action at this time.
0 commit comments