@@ -266,10 +266,12 @@ object Checking {
266266 (effs2 ++ effs).toList.flatMap(check(_))
267267 }
268268
269- // / Check if we can just directly promote a potential.
270- // / A potential can be (currently) directly promoted if and only if:
271- // / - `pot == this` and all fields of this are initialized, or
272- // / - `pot == Warm(C, outer)` where `outer` can be directly promoted.
269+ /**
270+ * Check if we can just directly promote a potential.
271+ * A potential can be (currently) directly promoted if and only if:
272+ * - `pot == this` and all fields of this are initialized, or
273+ * - `pot == Warm(C, outer)` where `outer` can be directly promoted.
274+ */
273275 private def canDirectlyPromote (pot : Potential , visited : Set [Potential ] = Set .empty)(using state : State ): Boolean = trace(" checking direct promotion of " + pot.show, init) {
274276 if (state.safePromoted.contains(pot)) true
275277 // If this potential's promotion depends on itself, we cannot directly promote it.
@@ -292,18 +294,20 @@ object Checking {
292294 }
293295 }
294296
295- // / Check the Promotion of a Warm object, according to "Rule 2":
296- //
297- // Rule 2: Promote(pot)
298- //
299- // for all concrete methods `m` of D
300- // pot.m!, Promote(pot.m)
301- //
302- // for all concrete fields `f` of D
303- // Promote(pot.f)
304- //
305- // for all inner classes `F` of D
306- // Warm[F, pot].init!, Promote(Warm[F, pot])
297+ /**
298+ * Check the Promotion of a Warm object, according to "Rule 2":
299+ *
300+ * Rule 2: Promote(pot)
301+ *
302+ * for all concrete methods `m` of D
303+ * pot.m!, Promote(pot.m)
304+ *
305+ * for all concrete fields `f` of D
306+ * Promote(pot.f)
307+ *
308+ * for all inner classes `F` of D
309+ * Warm[F, pot].init!, Promote(Warm[F, pot])
310+ */
307311 private def checkPromoteWarm (warm : Warm , eff : Effect )(using state : State ): Errors =
308312 val Warm (cls, outer) = warm
309313 val source = eff.source
0 commit comments