inference: restore probably partial raw inference as this way expected raw types are preserved and Objects won't be inferred in place where raw types were expected

This commit is contained in:
Anna.Kozlova
2016-03-30 12:15:25 +02:00
parent 40a35baa42
commit cc72bd0319
6 changed files with 37 additions and 14 deletions
@@ -17,6 +17,7 @@ package com.intellij.codeInsight.daemon.lambda;
import com.intellij.codeInsight.daemon.LightDaemonAnalyzerTestCase;
import com.intellij.codeInsight.daemon.impl.HighlightInfo;
import com.intellij.codeInspection.uncheckedWarnings.UncheckedWarningLocalInspection;
import com.intellij.lang.annotation.HighlightSeverity;
import com.intellij.openapi.projectRoots.JavaSdkVersion;
import com.intellij.openapi.projectRoots.Sdk;
@@ -418,6 +419,12 @@ public class GraphInferenceHighlightingTest extends LightDaemonAnalyzerTestCase
doTest();
}
public void testPartialRawSubstitutionToAvoidInferringObjectsWhenRawExpected() throws Exception {
final UncheckedWarningLocalInspection localInspection = new UncheckedWarningLocalInspection();
enableInspectionTool(localInspection);
doTest(true);
}
public void testVariableNamesOfNestedCalls() throws Exception {
IdeaTestUtil.setTestVersion(JavaSdkVersion.JDK_1_8, getModule(), getTestRootDisposable());
String filePath = BASE_PATH + "/" + getTestName(false) + ".java";