mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
don't cache substitutors during processing of all candidates (blinking red code)
This commit is contained in:
+13
@@ -15,6 +15,8 @@
|
||||
*/
|
||||
package com.intellij.codeInsight.daemon.lambda;
|
||||
|
||||
import com.intellij.codeInsight.ExpectedTypeInfo;
|
||||
import com.intellij.codeInsight.ExpectedTypesProvider;
|
||||
import com.intellij.codeInsight.daemon.LightDaemonAnalyzerTestCase;
|
||||
import com.intellij.openapi.projectRoots.Sdk;
|
||||
import com.intellij.psi.*;
|
||||
@@ -75,6 +77,17 @@ public class Java8ExpressionsCheckTest extends LightDaemonAnalyzerTestCase {
|
||||
doTestAllMethodCallExpressions();
|
||||
}
|
||||
|
||||
public void testNonCachingFolding() throws Exception {
|
||||
final String filePath = BASE_PATH + "/" + getTestName(false) + ".java";
|
||||
configureByFile(filePath);
|
||||
PsiNewExpression newWithAnonym =
|
||||
PsiTreeUtil.getParentOfType(getFile().findElementAt(getEditor().getCaretModel().getOffset()), PsiNewExpression.class);
|
||||
ExpectedTypeInfo[] types = ExpectedTypesProvider.getExpectedTypes(newWithAnonym, false);
|
||||
assertNotNull(types);
|
||||
|
||||
doTestConfiguredFile(false, false, filePath);
|
||||
}
|
||||
|
||||
private void doTestCachedUnresolved() {
|
||||
configureByFile(BASE_PATH + "/" + getTestName(false) + ".java");
|
||||
PsiMethodCallExpression callExpression =
|
||||
|
||||
Reference in New Issue
Block a user