mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-17 20:11:25 +07:00
inference: don't traverse up through lambda bounds when parent inference was already started, in this case it's exception inference which should work without top level node (EA-83073 - assert: LambdaUtil.treeWalkUp; IDEA-173467)
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
package foo;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
class Test {
|
||||
|
||||
public void setup(OngoingStubbing<Map<String, List<String>>> stubbing) throws ReflectiveOperationException {
|
||||
stubbing.thenAnswer(inv -> to<caret>Map((Collection) inv.getArguments()[0], periodic((String) null)));
|
||||
}
|
||||
|
||||
private <K, V> Map<K, V> toMap(Collection<K> keys, V v) {
|
||||
return Collections.emptyMap();
|
||||
}
|
||||
|
||||
private <T> List<T> periodic(T t) throws ReflectiveOperationException {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
abstract class OngoingStubbing<T> {
|
||||
abstract OngoingStubbing<T> thenAnswer(Answer<?> answer);
|
||||
}
|
||||
|
||||
interface Answer<T> {
|
||||
T answer(InvocationOnMock invocation) throws Throwable;
|
||||
}
|
||||
|
||||
interface InvocationOnMock {
|
||||
Object[] getArguments();
|
||||
}
|
||||
Reference in New Issue
Block a user