Skip to content

Commit 8ce0521

Browse files
committed
Rename WithCaptureChecks to CaptureChecked
1 parent bd8a4de commit 8ce0521

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

compiler/src/dotty/tools/dotc/core/Definitions.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1029,7 +1029,7 @@ class Definitions {
10291029
@tu lazy val UncheckedCapturesAnnot: ClassSymbol = requiredClass("scala.annotation.unchecked.uncheckedCaptures")
10301030
@tu lazy val VolatileAnnot: ClassSymbol = requiredClass("scala.volatile")
10311031
@tu lazy val WithPureFunsAnnot: ClassSymbol = requiredClass("scala.annotation.internal.WithPureFuns")
1032-
@tu lazy val WithCaptureChecksAnnot: ClassSymbol = requiredClass("scala.annotation.internal.WithCaptureChecks")
1032+
@tu lazy val CaptureCheckedAnnot: ClassSymbol = requiredClass("scala.annotation.internal.CaptureChecked")
10331033
@tu lazy val BeanGetterMetaAnnot: ClassSymbol = requiredClass("scala.annotation.meta.beanGetter")
10341034
@tu lazy val BeanSetterMetaAnnot: ClassSymbol = requiredClass("scala.annotation.meta.beanSetter")
10351035
@tu lazy val FieldMetaAnnot: ClassSymbol = requiredClass("scala.annotation.meta.field")

compiler/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -653,7 +653,7 @@ class TreeUnpickler(reader: TastyReader,
653653
registerSym(start, sym)
654654
if (isClass) {
655655
if sym.owner.is(Package) then
656-
if annots.exists(_.hasSymbol(defn.WithCaptureChecksAnnot)) then
656+
if annots.exists(_.hasSymbol(defn.CaptureCheckedAnnot)) then
657657
withCaptureChecks = true
658658
withPureFuns = true
659659
else if annots.exists(_.hasSymbol(defn.WithPureFunsAnnot)) then

compiler/src/dotty/tools/dotc/transform/PostTyper.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -418,9 +418,9 @@ class PostTyper extends MacroTransform with InfoTransformer { thisPhase =>
418418
val reference = ctx.settings.sourceroot.value
419419
val relativePath = util.SourceFile.relativePath(ctx.compilationUnit.source, reference)
420420
sym.addAnnotation(Annotation.makeSourceFile(relativePath, tree.span))
421-
if sym != defn.WithPureFunsAnnot && sym != defn.WithCaptureChecksAnnot then
421+
if sym != defn.WithPureFunsAnnot && sym != defn.CaptureCheckedAnnot then
422422
if Feature.ccEnabled then
423-
sym.addAnnotation(Annotation(defn.WithCaptureChecksAnnot, tree.span))
423+
sym.addAnnotation(Annotation(defn.CaptureCheckedAnnot, tree.span))
424424
else if Feature.pureFunsEnabled then
425425
sym.addAnnotation(Annotation(defn.WithPureFunsAnnot, tree.span))
426426
else

library/src/scala/annotation/internal/WithCaptureChecks.scala renamed to library/src/scala/annotation/internal/CaptureChecked.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ package internal
44
/** A marker annotation on a toplevel class that indicates
55
* that the class was typed with the captureChecking language import.
66
*/
7-
class WithCaptureChecks extends StaticAnnotation
7+
class CaptureChecked extends StaticAnnotation
88

0 commit comments

Comments
 (0)