mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
introduce variable: use right expression if left ref is unresolved (IDEA-72914)
This commit is contained in:
+15
@@ -0,0 +1,15 @@
|
||||
import java.util.*;
|
||||
|
||||
public class Test<T>
|
||||
{
|
||||
List<Collection<T>> getList ()
|
||||
{
|
||||
return new ArrayList<Collection<T>> ();
|
||||
}
|
||||
|
||||
public void test2 (Test<?> arg)
|
||||
{
|
||||
final List<? extends Collection<?>> collection = result;
|
||||
collection = arg.getList ();
|
||||
}
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
import java.util.*;
|
||||
|
||||
public class Test<T>
|
||||
{
|
||||
List<Collection<T>> getList ()
|
||||
{
|
||||
return new ArrayList<Collection<T>> ();
|
||||
}
|
||||
|
||||
public void test2 (Test<?> arg)
|
||||
{
|
||||
res<caret>ult = arg.getList ();
|
||||
}
|
||||
}
|
||||
@@ -273,6 +273,10 @@ public class IntroduceVariableTest extends LightCodeInsightTestCase {
|
||||
public void testPolyadic() throws Exception {
|
||||
doTest(new MockIntroduceVariableHandler("b1", true, true, true, "boolean"));
|
||||
}
|
||||
|
||||
public void testAssignmentToUnresolvedReference() throws Exception {
|
||||
doTest(new MockIntroduceVariableHandler("collection", true, true, true, "java.util.List<? extends java.util.Collection<?>>"));
|
||||
}
|
||||
|
||||
public void testSiblingInnerClassType() throws Exception {
|
||||
doTest(new MockIntroduceVariableHandler("vari", true, false, false, "A.B") {
|
||||
|
||||
Reference in New Issue
Block a user