mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
don't throw exceptions when completing in the RHS of >>, complete instead
This commit is contained in:
@@ -645,9 +645,7 @@ public class ExpectedTypesProvider {
|
||||
myResult = ExpectedTypeInfo.EMPTY_ARRAY;
|
||||
}
|
||||
else {
|
||||
ExpectedTypeInfoImpl info = createInfoImpl(PsiType.LONG, ExpectedTypeInfo.TYPE_BETWEEN,
|
||||
myExpr.getType(), TailType.NONE);
|
||||
myResult = new ExpectedTypeInfo[]{info};
|
||||
myResult = new ExpectedTypeInfo[]{createInfoImpl(PsiType.LONG, ExpectedTypeInfo.TYPE_BETWEEN, PsiType.INT, TailType.NONE)};
|
||||
}
|
||||
}
|
||||
else if (i == JavaTokenType.OROR || i == JavaTokenType.ANDAND) {
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
public class SomeClass {
|
||||
Object myField1;
|
||||
Object myField2;
|
||||
|
||||
void foo(int param) {
|
||||
int a = param >> my<caret>
|
||||
}
|
||||
}
|
||||
@@ -645,5 +645,10 @@ public class NormalCompletionTest extends LightCompletionTestCase {
|
||||
|
||||
public void testPrimitiveMethodParameter() throws Throwable { doTest(); }
|
||||
|
||||
public void testRightShift() throws Throwable {
|
||||
configureByFile("/codeInsight/completion/normal/" + getTestName(false) + ".java");
|
||||
assertStringItems("myField1", "myField2");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user