Skip to content

Commit 1f62049

Browse files
committed
Add TODOs and fix typos
1 parent 687d06e commit 1f62049

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

compiler/src/dotty/tools/dotc/ast/Trees.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -682,7 +682,7 @@ object Trees {
682682
* they can be typed as a `Quote` with a known `tpt` or desugared and
683683
* typed as a quote pattern.
684684
*
685-
* `Quotes` are checked transformed in the `staging`, `splicing` and `pickleQuotes`
685+
* `Quotes` are checked and transformed in the `staging`, `splicing` and `pickleQuotes`
686686
* phases. After `pickleQuotes` phase, the only quotes that exist are in `inline`
687687
* methods. These are dropped when we remove the inline method implementations.
688688
*
@@ -703,8 +703,8 @@ object Trees {
703703
* they can be typed as a `Splice` with a known `tpt` or desugared and
704704
* typed as a quote pattern holes.
705705
*
706-
* `Splice` are checked transformed in the `staging` and `splicing` phases.
707-
* After `splicing` phase, the only quotes that exist are in `inline`
706+
* `Splice` are checked and transformed in the `staging` and `splicing` phases.
707+
* After `splicing` phase, the only splices that exist are in `inline`
708708
* methods. These are dropped when we remove the inline method implementations.
709709
*
710710
* The `tpt` will be transformed in `staging` and used in `splicing` to create `Hole`s.

compiler/src/dotty/tools/dotc/typer/QuotesAndSplices.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ trait QuotesAndSplices {
5959
report.error(msg, tree.srcPos)
6060
EmptyTree
6161
else
62+
// TODO typecheck directly (without `exprQuote`)
6263
val exprQuoteTree = untpd.Apply(untpd.ref(defn.QuotedRuntime_exprQuote.termRef), tree.expr)
6364
val quotedExpr = typedApply(exprQuoteTree, pt)(using quoteContext) match
6465
case Apply(TypeApply(fn, tpt :: Nil), quotedExpr :: Nil) => Quote(quotedExpr, tpt)
@@ -106,9 +107,9 @@ trait QuotesAndSplices {
106107
markAsMacro(ctx)
107108
}
108109

110+
// TODO typecheck directly (without `exprSplice`)
109111
val internalSplice =
110112
untpd.Apply(untpd.ref(defn.QuotedRuntime_exprSplice.termRef), tree.expr)
111-
112113
typedApply(internalSplice, pt)(using spliceContext).withSpan(tree.span) match
113114
case tree @ Apply(TypeApply(_, tpt :: Nil), spliced :: Nil) if tree.symbol == defn.QuotedRuntime_exprSplice =>
114115
cpy.Splice(tree)(spliced, tpt)

0 commit comments

Comments
 (0)