File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
compiler/src/dotty/tools/dotc/transform/init Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -781,14 +781,15 @@ object Semantic {
781
781
final def work ()(using State , Context ): Unit =
782
782
pendingTasks match
783
783
case task :: rest =>
784
- doTask(task)
784
+ val res = doTask(task)
785
+ res.errors.foreach(_.issue)
785
786
786
- if cache.changed then
787
- // discard heap changes and copy cache.out to cache.in
788
- cache.update()
789
- else
787
+ if res.errors.nonEmpty then
790
788
pendingTasks = rest
791
789
checkedTasks = checkedTasks + task
790
+ else
791
+ // discard heap changes and copy cache.out to cache.in
792
+ cache.update()
792
793
793
794
work()
794
795
case _ =>
@@ -797,7 +798,7 @@ object Semantic {
797
798
*
798
799
* This method should only be called from the work list scheduler.
799
800
*/
800
- private def doTask (task : Task )(using State , Context ): Unit = {
801
+ private def doTask (task : Task )(using State , Context ): Result = {
801
802
val thisRef = task
802
803
val tpl = thisRef.klass.defTree.asInstanceOf [TypeDef ].rhs.asInstanceOf [Template ]
803
804
@@ -807,8 +808,7 @@ object Semantic {
807
808
given Trace = Trace .empty
808
809
given Env = Env (paramValues)
809
810
810
- val res = init(tpl, thisRef, thisRef.klass)
811
- res.errors.foreach(_.issue)
811
+ init(tpl, thisRef, thisRef.klass)
812
812
}
813
813
}
814
814
inline def workList (using wl : WorkList ): WorkList = wl
You can’t perform that action at this time.
0 commit comments