File tree 2 files changed +4
-4
lines changed
compiler/src/dotty/tools/dotc/transform/init
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -246,8 +246,8 @@ class CycleChecker(cache: Cache) {
246
246
val pot = Hot (dep.cls)(dep.source)
247
247
val effs = pot.potentialsOf(dep.symbol)(using env).promote(dep.source)
248
248
249
- val errs = effs.flatMap(Checking .check(_)(using state))
250
- assert( errs.isEmpty, " unexpected errors: " + Errors .show(errs.toList) )
249
+ val errs = effs.flatMap(Checking .check(_)(using state)).filter( ! _. isInstanceOf [ CallUnknown ])
250
+ errs.foreach(_.issue )
251
251
252
252
val deps = state.dependencies.toList
253
253
proxyCache(dep.symbol) = deps
@@ -364,7 +364,7 @@ class CycleChecker(cache: Cache) {
364
364
val effs = pot.effectsOf(dep.symbol)(using env)
365
365
366
366
val errs = effs.flatMap(Checking .check(_)(using state))
367
- assert( errs.isEmpty, " unexpected errors: " + Errors .show(errs.toList) + " while analyzing " + dep.show )
367
+ errs.foreach(_.issue )
368
368
369
369
state.dependencies.toList
370
370
}
Original file line number Diff line number Diff line change @@ -116,7 +116,7 @@ object Errors {
116
116
117
117
case class CallUnknown (meth : Symbol , source : Tree , trace : Seq [Tree ]) extends Error {
118
118
def show (using Context ): String =
119
- " Calling the external method " + meth.show + " may cause initialization errors " + " ."
119
+ " Unable to analyze external " + meth.show + " ."
120
120
}
121
121
122
122
/** Promote a value under initialization to fully-initialized */
You can’t perform that action at this time.
0 commit comments