replace with diamonds should always check if inferred type agrees with expected type (IDEA-73944)

This commit is contained in:
anna
2011-09-07 11:50:41 +02:00
parent e24044f3aa
commit 8fef5fc92d
12 changed files with 97 additions and 18 deletions

View File

@@ -16,6 +16,7 @@ import com.intellij.util.containers.MultiMap;
import junit.framework.Assert;
import org.jetbrains.annotations.NonNls;
import java.util.ArrayList;
import java.util.Collection;
/**
@@ -253,6 +254,10 @@ public class IntroduceVariableTest extends LightCodeInsightTestCase {
doTest(new MockIntroduceVariableHandler("a", true, true, true, "java.util.ArrayList<java.lang.String>"));
}
public void testCantCollapsedToDiamond() throws Exception {
doTest(new MockIntroduceVariableHandler("a", true, true, true, "Foo<java.lang.Number>"));
}
public void testSiblingInnerClassType() throws Exception {
doTest(new MockIntroduceVariableHandler("vari", true, false, false, "A.B") {
@Override