@@ -267,11 +267,11 @@ object Checking {
267
267
}
268
268
269
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
- */
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
+ */
275
275
private def canDirectlyPromote (pot : Potential , visited : Set [Potential ] = Set .empty)(using state : State ): Boolean = trace(" checking direct promotion of " + pot.show, init) {
276
276
if (state.safePromoted.contains(pot)) true
277
277
// If this potential's promotion depends on itself, we cannot directly promote it.
@@ -295,19 +295,19 @@ object Checking {
295
295
}
296
296
297
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
- */
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
+ */
311
311
private def checkPromoteWarm (warm : Warm , eff : Effect )(using state : State ): Errors =
312
312
val Warm (cls, outer) = warm
313
313
val source = eff.source
0 commit comments