mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
java recursion prevention: don't detect switch expression type by target for old inference algorithm
switch expressions are not applicable but they are parsable in older language levels, see LightAdvHighlightingJdk6Test.testUnsupportedFeatures GitOrigin-RevId: d9ce28f08c386705c5560bc283961822823afcb4
This commit is contained in:
committed by
intellij-monorepo-bot
parent
e4d0f4078a
commit
b6d5ec0315
+2
-1
@@ -32,7 +32,8 @@ public class PsiSwitchExpressionImpl extends PsiSwitchBlockImpl implements PsiSw
|
||||
|
||||
@Override
|
||||
public PsiType getType() {
|
||||
if (PsiPolyExpressionUtil.isPolyExpression(this) &&
|
||||
if (PsiUtil.isLanguageLevel8OrHigher(this) &&
|
||||
PsiPolyExpressionUtil.isPolyExpression(this) &&
|
||||
!MethodCandidateInfo.isOverloadCheck(PsiUtil.skipParenthesizedExprUp(getParent()))) {
|
||||
return InferenceSession.getTargetType(this);
|
||||
}
|
||||
|
||||
@@ -373,7 +373,6 @@ public final class RecursionManager {
|
||||
"com.intellij.lang.javascript.psi.types.JSTypeBaseImpl.substitute(",
|
||||
|
||||
// IDEA-228814
|
||||
"com.intellij.psi.infos.MethodCandidateInfo.getPertinentApplicabilityLevel(",
|
||||
"com.intellij.psi.ThreadLocalTypes.performWithTypes(",
|
||||
|
||||
// IDEA-212671
|
||||
|
||||
Reference in New Issue
Block a user