Force-resolve body in contract computation under lock
Even though acquire/release pattern guarantees memory visibility across threads, it doesn't prevents concurrent access to critical section (i.e. to force-resolve of the corresponding body). This can lead to multiple resolution passes over one and the same PSI in IDE, which, in turn, leads to 'rewrite at slice'-exceptions. See KT-30030 for case description and details. ^KT-30030 Fixed
This commit is contained in:
+1
-1
@@ -201,7 +201,7 @@ public class RecursiveDescriptorComparator {
|
||||
}
|
||||
|
||||
private static void printEffectsIfAny(FunctionDescriptor functionDescriptor, Printer printer) {
|
||||
LazyContractProvider contractProvider = functionDescriptor.getUserData(ContractProviderKey.INSTANCE);
|
||||
AbstractContractProvider contractProvider = functionDescriptor.getUserData(ContractProviderKey.INSTANCE);
|
||||
if (contractProvider == null) return;
|
||||
|
||||
ContractDescription contractDescription = contractProvider.getContractDescription();
|
||||
|
||||
Reference in New Issue
Block a user