Files
openide/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/expressions/RecursiveApplicabilityCheck.java
Anna Kozlova d829a7c8f4 java inference: ensure that applicability check is not re-entered
this fixes assertion
	at com.intellij.util.ObjectUtils.assertNotNull(ObjectUtils.java:84)
	at com.intellij.psi.infos.MethodCandidateInfo.inferTypeArguments(MethodCandidateInfo.java:453)
caused by including expression compatibility constraints for expressions inside lambdas for which parameter types are calculated

GitOrigin-RevId: 0588bff4a719fb73ff49a51bc86635e56cd8d146
2019-09-05 19:19:32 +00:00

40 lines
1.4 KiB
Java

import java.util.Map;
import java.util.concurrent.ConcurrentMap;
import java.util.function.Function;
import java.util.function.Supplier;
class AsyncContext {
public static <T> T computeOnEdt(Supplier<T> supplier) {
return null;
}
public static <K, V> ConcurrentMap<K, V> create(Function<? super K, ? extends V> computeValue,
Supplier<? extends ConcurrentMap<K, V>> mapCreator) {
return null;
}
private static final Provider provider = null;
private final Map<Component, Provider> myProviders = create(key->
computeOnEdt(() -> {
return dataKey -> {
return computeOnEdt(() -> {
return provider.get<caret>Data(dataKey);
});
};
}),
AsyncContext::createConcurrentWeakKeySoftValueMap
);
public static <K,V> ConcurrentMap<K,V> createConcurrentWeakKeySoftValueMap() {
return null;
}
}
abstract class Component {}
interface Provider {
Object getData(String key);
}