Skip to content

Commit 24ae305

Browse files
committed
Remove unsused annotation
`@patternBindHole` was replaced by `@patternType`
1 parent 1b7cc7d commit 24ae305

File tree

3 files changed

+6
-11
lines changed

3 files changed

+6
-11
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -919,8 +919,8 @@ object desugar {
919919
def quotedPatternTypeDef(tree: TypeDef)(using Context): TypeDef = {
920920
assert(ctx.mode.is(Mode.QuotedPattern))
921921
if (tree.name.startsWith("$") && !tree.isBackquoted) {
922-
val patternBindHoleAnnot = New(ref(defn.InternalQuotedPatterns_patternTypeAnnot.typeRef)).withSpan(tree.span)
923-
val mods = tree.mods.withAddedAnnotation(patternBindHoleAnnot)
922+
val patternTypeAnnot = New(ref(defn.InternalQuotedPatterns_patternTypeAnnot.typeRef)).withSpan(tree.span)
923+
val mods = tree.mods.withAddedAnnotation(patternTypeAnnot)
924924
tree.withMods(mods)
925925
}
926926
else tree

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ trait QuotesAndSplices {
197197
)
198198

199199
/** Split a typed quoted pattern is split into its type bindings, pattern expression and inner patterns.
200-
* Type definitions with `@patternBindHole` will be inserted in the pattern expression for each type binding.
200+
* Type definitions with `@patternType` will be inserted in the pattern expression for each type binding.
201201
*
202202
* A quote pattern
203203
* ```
@@ -208,7 +208,7 @@ trait QuotesAndSplices {
208208
* (
209209
* Map(<$t>: Symbol -> <$t @ _>: Bind),
210210
* <'{
211-
* @scala.internal.Quoted.patternBindHole type $t
211+
* @scala.internal.Quoted.patternType type $t
212212
* scala.internal.Quoted.patternHole[List[$t]]
213213
* }>: Tree,
214214
* List(<ls: Expr[List[$t]]>: Tree)
@@ -366,7 +366,7 @@ trait QuotesAndSplices {
366366
* ```
367367
*
368368
* For each type splice we will create a new type binding in the pattern match ($t @ _ in this case)
369-
* and a corresponding type in the quoted pattern as a hole (@patternBindHole type $t in this case).
369+
* and a corresponding type in the quoted pattern as a hole (@patternType type $t in this case).
370370
* All these generated types are inserted at the start of the quoted code.
371371
*
372372
* After typing the tree will resemble
@@ -388,7 +388,7 @@ trait QuotesAndSplices {
388388
* (implicit t @ _, ls @ _: Expr[List[$t]]) // from the spliced patterns
389389
* )(
390390
* '{ // Runtime quote Matcher.unapply uses to mach against. Expression directly inside the quoted pattern without the splices
391-
* @scala.internal.Quoted.patternBindHole type $t
391+
* @scala.internal.Quoted.patternType type $t
392392
* scala.internal.Quoted.patternHole[List[$t]]
393393
* },
394394
* true, // If there is at least one type splice. Used to instantiate the context with or without GADT constraints

library/src-bootstrapped/scala/internal/quoted/Patterns.scala

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,6 @@ object Patterns {
1616
/** A higher order splice in a quoted pattern is desugared by the compiler into a call to this method */
1717
def higherOrderHole[U](args: Any*): U = ???
1818

19-
// TODO remove
20-
/** A splice of a name in a quoted pattern is desugared by wrapping getting this annotation */
21-
@compileTimeOnly("Illegal reference to `scala.internal.quoted.CompileTime.patternBindHole`")
22-
class patternBindHole extends Annotation
23-
2419
/** A splice of a name in a quoted pattern is that marks the definition of a type splice */
2520
@compileTimeOnly("Illegal reference to `scala.internal.quoted.CompileTime.patternType`")
2621
class patternType extends Annotation

0 commit comments

Comments
 (0)