File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
compiler/src/dotty/tools/dotc/quoted Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import dotty.tools.dotc.tastyreflect.ReflectionImpl
66object QuoteContext {
77
88 def apply ()(using Context ): scala.quoted.QuoteContext =
9- new scala.quoted. QuoteContext (ReflectionImpl (summon[Context ]))
9+ new QuoteContext (ReflectionImpl (summon[Context ]))
1010
1111 type ScopeId = Int
1212
@@ -19,3 +19,5 @@ object QuoteContext {
1919 private [dotty] def scopeId (using Context ): ScopeId =
2020 summon[Context ].outersIterator.toList.last.hashCode()
2121}
22+
23+ class QuoteContext (val tasty : scala.tasty.Reflection ) extends scala.quoted.QuoteContext
Original file line number Diff line number Diff line change @@ -10,7 +10,12 @@ import scala.quoted.show.SyntaxHighlight
1010 *
1111 * @param tasty Typed AST API. Usage: `def f(qctx: QuoteContext) = { import qctx.tasty._; ... }`.
1212 */
13- class QuoteContext (val tasty : scala.tasty.Reflection ) { self =>
13+ trait QuoteContext { self =>
14+
15+ /** Low-level Typed AST API `tasty` meta-programming API.
16+ * This API does not have the static type guarantiees that `Expr` and `Type` provide.
17+ */
18+ val tasty : scala.tasty.Reflection
1419
1520 /** Type of a QuoteContext provided by a splice within a quote that took this context.
1621 * It is only required if working with the reflection API.
You can’t perform that action at this time.
0 commit comments