diff --git a/compiler/src/dotty/tools/dotc/cc/CheckCaptures.scala b/compiler/src/dotty/tools/dotc/cc/CheckCaptures.scala index 4d905a5df4ab..77d893ad49b9 100644 --- a/compiler/src/dotty/tools/dotc/cc/CheckCaptures.scala +++ b/compiler/src/dotty/tools/dotc/cc/CheckCaptures.scala @@ -28,6 +28,9 @@ import reporting.{trace, Message, OverrideError} object CheckCaptures: import ast.tpd.* + val name: String = "cc" + val description: String = "capture checking" + enum EnvKind: case Regular // normal case case NestedInOwner // environment is a temporary one nested in the owner's environment, @@ -192,7 +195,9 @@ class CheckCaptures extends Recheck, SymTransformer: import ast.tpd.* import CheckCaptures.* - def phaseName: String = "cc" + override def phaseName: String = CheckCaptures.name + + override def description: String = CheckCaptures.description override def isRunnable(using Context) = super.isRunnable && Feature.ccEnabledSomewhere diff --git a/compiler/src/dotty/tools/dotc/cc/Setup.scala b/compiler/src/dotty/tools/dotc/cc/Setup.scala index 76ae41649517..3147a0f7bd47 100644 --- a/compiler/src/dotty/tools/dotc/cc/Setup.scala +++ b/compiler/src/dotty/tools/dotc/cc/Setup.scala @@ -28,6 +28,9 @@ trait SetupAPI: object Setup: + val name: String = "ccSetup" + val description: String = "prepare compilation unit for capture checking" + /** Recognizer for `res $throws exc`, returning `(res, exc)` in case of success */ object throwsAlias: def unapply(tp: Type)(using Context): Option[(Type, Type)] = tp match @@ -53,6 +56,10 @@ import Setup.* class Setup extends PreRecheck, SymTransformer, SetupAPI: thisPhase => + override def phaseName: String = Setup.name + + override def description: String = Setup.description + override def isRunnable(using Context) = super.isRunnable && Feature.ccEnabledSomewhere