@@ -226,7 +226,7 @@ class CycleChecker(cache: Cache) {
226
226
}
227
227
228
228
private def proxyDependencies (dep : ProxyUsage )(using Context ): List [Dependency ] = trace(" dependencies of " + dep.symbol.show, init, _.asInstanceOf [List [Dependency ]].map(_.show).toString) {
229
- if (proxyCache.contains(dep.symbol)) summaryCache (dep.symbol)
229
+ if (proxyCache.contains(dep.symbol)) proxyCache (dep.symbol)
230
230
else trace(" summary for " + dep.symbol.show) {
231
231
val env = Env (ctx.withOwner(dep.cls), cache)
232
232
val state = new Checking .State (
@@ -350,24 +350,23 @@ class CycleChecker(cache: Cache) {
350
350
351
351
private def analyzeMethod (dep : StaticCall )(using Context ): List [Dependency ] = {
352
352
val env = Env (ctx.withOwner(dep.cls), cache)
353
- val state = new Checking .State (
353
+ val state = Checking .State (
354
354
visited = Set .empty,
355
355
path = Vector .empty,
356
356
thisClass = dep.cls,
357
357
fieldsInited = mutable.Set .empty,
358
358
parentsInited = mutable.Set .empty,
359
359
safePromoted = mutable.Set (ThisRef ()(dep.cls.defTree)),
360
360
dependencies = mutable.Set .empty,
361
- env = env
362
- ) {
363
- override def isFieldInitialized (field : Symbol ): Boolean = true
364
- }
361
+ env = env,
362
+ init = true
363
+ )
365
364
366
365
val pot = Hot (dep.cls)(dep.source)
367
366
val effs = pot.effectsOf(dep.symbol)(using env)
368
367
369
368
val errs = effs.flatMap(Checking .check(_)(using state))
370
- assert(errs.isEmpty, " unexpected errors: " + Errors .show(errs.toList))
369
+ assert(errs.isEmpty, " unexpected errors: " + Errors .show(errs.toList) + " while analyzing " + dep.show )
371
370
372
371
state.dependencies.toList
373
372
}
0 commit comments