mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-06 05:10:22 +07:00
testdata for IDEA-140035
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
class Test {
|
||||
|
||||
static class Row {
|
||||
public String get(int index) {
|
||||
return "test";
|
||||
}
|
||||
}
|
||||
|
||||
void foo(List<Row> list) {
|
||||
list.stream().collect(
|
||||
Collectors.toMap(a -> String.valueOf(a.get(0)), a -> String.valueOf(a.get(1))));
|
||||
}
|
||||
}
|
||||
@@ -43,6 +43,17 @@ public class Java8ExpressionsCheckTest extends LightDaemonAnalyzerTestCase {
|
||||
doTestAllMethodCallExpressions();
|
||||
}
|
||||
|
||||
public void testIDEA140035() throws Exception {
|
||||
doTestAllMethodCallExpressions();
|
||||
final Collection<PsiParameter> parameterLists = PsiTreeUtil.findChildrenOfType(getFile(), PsiParameter.class);
|
||||
for (PsiParameter parameter : parameterLists) {
|
||||
if (parameter.getTypeElement() != null) continue;
|
||||
getPsiManager().dropResolveCaches();
|
||||
final PsiType type = parameter.getType();
|
||||
assertFalse("Failed inference for: " + parameter.getParent().getText(), type instanceof PsiLambdaParameterType);
|
||||
}
|
||||
}
|
||||
|
||||
private void doTestAllMethodCallExpressions() {
|
||||
configureByFile(BASE_PATH + "/" + getTestName(false) + ".java");
|
||||
final Collection<PsiCallExpression> methodCallExpressions = PsiTreeUtil.findChildrenOfType(getFile(), PsiCallExpression.class);
|
||||
|
||||
Reference in New Issue
Block a user