don't throw exceptions when completing in the RHS of >>, complete instead

This commit is contained in:
peter
2010-08-26 17:07:18 +01:00
parent acac73de5e
commit 0afff998b0
3 changed files with 14 additions and 3 deletions
@@ -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");
}
}