Files
kotlin-fork/idea/testData/resolve/referenceWithLib/infinityAndNanInJavaAnnotationSrc/J.java
T
Alexander Udalov f2bf81e799 Fix UOE when using Java annotation with infinity/NaN as default value
The root problem is the fact that ConstantExpressionEvaluator returns
null for values such as infinity and NaN loaded from cls psi (see
IDEA-207252). This commit simply reverts a part of 8ab9226805 where we
started to compute default values more often than needed. In
LazyJavaClassMemberScope, we only need to check whether or not there
_is_ a default value, not compute its value.

 #KT-29792 Fixed
2019-02-15 19:13:53 +01:00

14 lines
451 B
Java
Vendored

package dependency;
public @interface J {
double minusInf() default Double.NEGATIVE_INFINITY;
double plusInf() default Double.POSITIVE_INFINITY;
double nan() default Double.NaN;
double divisionByZero() default 1.0 / 0.0;
float minusInfFloat() default Float.NEGATIVE_INFINITY;
float plusInfFloat() default Float.POSITIVE_INFINITY;
float nanFloat() default Float.NaN;
float divisionByZeroFloat() default 1.0f / 0.0f;
}