Skip to content

Commit fdb9b71

Browse files
authored
Fix #21939: Update names and descriptions for cc and setup phases (#21942)
Fix #21939 ``` preRecheck preRecheck recheck recheck ccSetup prepare compilation unit for capture checking cc capture checking ```
2 parents dbd4988 + d2773e8 commit fdb9b71

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ import reporting.{trace, Message, OverrideError}
2828
object CheckCaptures:
2929
import ast.tpd.*
3030

31+
val name: String = "cc"
32+
val description: String = "capture checking"
33+
3134
enum EnvKind:
3235
case Regular // normal case
3336
case NestedInOwner // environment is a temporary one nested in the owner's environment,
@@ -192,7 +195,9 @@ class CheckCaptures extends Recheck, SymTransformer:
192195
import ast.tpd.*
193196
import CheckCaptures.*
194197

195-
def phaseName: String = "cc"
198+
override def phaseName: String = CheckCaptures.name
199+
200+
override def description: String = CheckCaptures.description
196201

197202
override def isRunnable(using Context) = super.isRunnable && Feature.ccEnabledSomewhere
198203

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ trait SetupAPI:
2828

2929
object Setup:
3030

31+
val name: String = "ccSetup"
32+
val description: String = "prepare compilation unit for capture checking"
33+
3134
/** Recognizer for `res $throws exc`, returning `(res, exc)` in case of success */
3235
object throwsAlias:
3336
def unapply(tp: Type)(using Context): Option[(Type, Type)] = tp match
@@ -53,6 +56,10 @@ import Setup.*
5356
class Setup extends PreRecheck, SymTransformer, SetupAPI:
5457
thisPhase =>
5558

59+
override def phaseName: String = Setup.name
60+
61+
override def description: String = Setup.description
62+
5663
override def isRunnable(using Context) =
5764
super.isRunnable && Feature.ccEnabledSomewhere
5865

0 commit comments

Comments
 (0)