Skip to content

Commit b272d84

Browse files
committed
Fix comment style
1 parent 8d5640a commit b272d84

File tree

1 file changed

+20
-16
lines changed

1 file changed

+20
-16
lines changed

compiler/src/dotty/tools/dotc/transform/init/Checking.scala

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -256,10 +256,12 @@ object Checking {
256256
(effs2 ++ effs).toList.flatMap(check(_))
257257
}
258258

259-
/// Check if we can just directly promote a potential.
260-
/// A potential can be (currently) directly promoted if and only if:
261-
/// - `pot == this` and all fields of this are initialized, or
262-
/// - `pot == Warm(C, outer)` where `outer` can be directly promoted.
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+
*/
263265
private def canDirectlyPromote(pot: Potential, visited: Set[Potential] = Set.empty)(using state: State): Boolean = trace("checking direct promotion of " + pot.show, init) {
264266
if (state.safePromoted.contains(pot)) true
265267
// If this potential's promotion depends on itself, we cannot directly promote it.
@@ -282,18 +284,20 @@ object Checking {
282284
}
283285
}
284286

285-
/// Check the Promotion of a Warm object, according to "Rule 2":
286-
//
287-
// Rule 2: Promote(pot)
288-
//
289-
// for all concrete methods `m` of D
290-
// pot.m!, Promote(pot.m)
291-
//
292-
// for all concrete fields `f` of D
293-
// Promote(pot.f)
294-
//
295-
// for all inner classes `F` of D
296-
// Warm[F, pot].init!, Promote(Warm[F, pot])
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+
*/
297301
private def checkPromoteWarm(warm: Warm, eff: Effect)(using state: State): Errors =
298302
val Warm(cls, outer) = warm
299303
val source = eff.source

0 commit comments

Comments
 (0)