File tree 1 file changed +4
-4
lines changed
compiler/src/dotty/tools/dotc/transform/init 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -105,8 +105,8 @@ class CycleChecker(cache: Cache) {
105
105
val res = op(using state2)
106
106
res
107
107
108
- def withPath [T ](obj : Symbol )(op : State ?=> T ): T =
109
- val state2 = this .copy(path = path :+ obj )
108
+ def visitObject [T ](dep : ObjectAccess )(op : State ?=> T ): T =
109
+ val state2 = this .copy(path = path :+ dep.symbol, trace = trace :+ dep )
110
110
val res = op(using state2)
111
111
res
112
112
@@ -155,8 +155,8 @@ class CycleChecker(cache: Cache) {
155
155
ObjectLeakDuringInit (obj, trace) :: Nil
156
156
else
157
157
val constr = obj.moduleClass.primaryConstructor
158
- state.withPath(obj ) {
159
- check(StaticCall (constr.owner.asClass, constr)(dep.source ))
158
+ state.visitObject(dep ) {
159
+ check(StaticCall (constr.owner.asClass, constr)(constr.defTree ))
160
160
}
161
161
}
162
162
You can’t perform that action at this time.
0 commit comments