From 271fee3eab58ba77f21d14d51e0c6a8bd35f79b5 Mon Sep 17 00:00:00 2001 From: "Aleksei.Luchinin" Date: Fri, 5 Jul 2024 13:40:13 +0300 Subject: [PATCH] Fix #526 --- .../kotlin/org/arend/typechecking/error/ErrorService.kt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/kotlin/org/arend/typechecking/error/ErrorService.kt b/src/main/kotlin/org/arend/typechecking/error/ErrorService.kt index d88d7f856..5f0ae752d 100644 --- a/src/main/kotlin/org/arend/typechecking/error/ErrorService.kt +++ b/src/main/kotlin/org/arend/typechecking/error/ErrorService.kt @@ -121,9 +121,11 @@ class ErrorService : ErrorReporter { val arendErrors = typecheckingErrors[file] ?: return emptyList() val list = ArrayList>() - for (arendError in arendErrors) { - arendError.cause?.let { - list.add(Pair(arendError.error, it)) + synchronized(arendErrors) { + for (arendError in arendErrors) { + arendError.cause?.let { + list.add(Pair(arendError.error, it)) + } } } return list