mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 11:00:04 +07:00
IDEA-66564 (parse indeterminate FP literals in compiled annotations, ultimate fix)
This commit is contained in:
@@ -664,9 +664,9 @@ public class ClsRepositoryUseTest extends PsiTestCase{
|
||||
assert method instanceof PsiAnnotationMethod : method;
|
||||
try {
|
||||
final PsiAnnotationMemberValue defaultValue = ((PsiAnnotationMethod)method).getDefaultValue();
|
||||
assert defaultValue instanceof PsiReferenceExpression : defaultValue;
|
||||
final String type = method.getName().startsWith("f") ? "Float." : "Double";
|
||||
assert defaultValue.getText().contains(type) : defaultValue;
|
||||
assert defaultValue instanceof PsiBinaryExpression : defaultValue;
|
||||
final PsiPrimitiveType type = method.getName().startsWith("f") ? PsiType.FLOAT : PsiType.DOUBLE;
|
||||
assertEquals(type, ((PsiBinaryExpression)defaultValue).getType());
|
||||
}
|
||||
catch (Exception e) {
|
||||
final String valueText = ((PsiMethodStub)((StubBasedPsiElement)method).getStub()).getDefaultValueText();
|
||||
|
||||
Reference in New Issue
Block a user