Skip to content

Commit 9bdf3a7

Browse files
committed
Documenting where the annotations were added
1 parent 1cf238f commit 9bdf3a7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

compiler/src/dotty/tools/dotc/cc/CheckCaptures.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -735,7 +735,8 @@ class CheckCaptures extends Recheck, SymTransformer:
735735
val argType = recheck(arg, freshenedFormal)
736736
.showing(i"recheck arg $arg vs $freshenedFormal = $result", capt)
737737
if formal.hasAnnotation(defn.UseAnnot) || formal.hasAnnotation(defn.ConsumeAnnot) then
738-
// The @use and/or @consume annotation is added to `formal` by `prepareFunction`
738+
// The @use and/or @consume annotation is added to `formal` when creating methods types.
739+
// See [[MethodTypeCompanion.adaptParamInfo]].
739740
capt.println(i"charging deep capture set of $arg: ${argType} = ${argType.deepCaptureSet}")
740741
markFree(argType.deepCaptureSet, arg)
741742
if formal.containsCap then

0 commit comments

Comments
 (0)