Skip to content

Commit 0f3d3dd

Browse files
committed
Fix init checker error
1 parent 4c2bdc9 commit 0f3d3dd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,7 @@ object CaptureSet:
423423
abstract class DerivedVar(initialElems: Refs)(using @constructorOnly ctx: Context)
424424
extends Var(initialElems):
425425
def source: Var
426+
val stack = if debugSets && this.isInstanceOf[Mapped] then (new Throwable).getStackTrace().nn.take(20) else null
426427

427428
addSub(source)
428429

@@ -437,7 +438,6 @@ object CaptureSet:
437438
(val source: Var, tm: TypeMap, variance: Int, initial: CaptureSet)(using @constructorOnly ctx: Context)
438439
extends DerivedVar(initial.elems):
439440
addSub(initial)
440-
val stack = if debugSets then (new Throwable).getStackTrace().nn.take(20) else null
441441

442442
override def addNewElems(newElems: Refs, origin: CaptureSet)(using Context, VarState): CompareResult =
443443
addNewElemsImpl(newElems: Refs, origin: CaptureSet)

0 commit comments

Comments
 (0)