@@ -257,11 +257,11 @@ object Checking {
257
257
}
258
258
259
259
/**
260
- * Check if we can just directly promote a potential.
261
- * A potential can be (currently) directly promoted if and only if:
262
- * - `pot == this` and all fields of this are initialized, or
263
- * - `pot == Warm(C, outer)` where `outer` can be directly promoted.
264
- */
260
+ * Check if we can just directly promote a potential.
261
+ * A potential can be (currently) directly promoted if and only if:
262
+ * - `pot == this` and all fields of this are initialized, or
263
+ * - `pot == Warm(C, outer)` where `outer` can be directly promoted.
264
+ */
265
265
private def canDirectlyPromote (pot : Potential , visited : Set [Potential ] = Set .empty)(using state : State ): Boolean = trace(" checking direct promotion of " + pot.show, init) {
266
266
if (state.safePromoted.contains(pot)) true
267
267
// If this potential's promotion depends on itself, we cannot directly promote it.
@@ -285,19 +285,19 @@ object Checking {
285
285
}
286
286
287
287
/**
288
- * Check the Promotion of a Warm object, according to "Rule 2":
289
- *
290
- * Rule 2: Promote(pot)
291
- *
292
- * for all concrete methods `m` of D
293
- * pot.m!, Promote(pot.m)
294
- *
295
- * for all concrete fields `f` of D
296
- * Promote(pot.f)
297
- *
298
- * for all inner classes `F` of D
299
- * Warm[F, pot].init!, Promote(Warm[F, pot])
300
- */
288
+ * Check the Promotion of a Warm object, according to "Rule 2":
289
+ *
290
+ * Rule 2: Promote(pot)
291
+ *
292
+ * for all concrete methods `m` of D
293
+ * pot.m!, Promote(pot.m)
294
+ *
295
+ * for all concrete fields `f` of D
296
+ * Promote(pot.f)
297
+ *
298
+ * for all inner classes `F` of D
299
+ * Warm[F, pot].init!, Promote(Warm[F, pot])
300
+ */
301
301
private def checkPromoteWarm (warm : Warm , eff : Effect )(using state : State ): Errors =
302
302
val Warm (cls, outer) = warm
303
303
val source = eff.source
0 commit comments