resolveCompileTimeConstantValue() rewritten to Kotlin
This commit is contained in:
committed by
Alexander Udalov
parent
6aca05023a
commit
3d1f2c25e2
+5
-4
@@ -25,9 +25,9 @@ import org.jetbrains.jet.lang.descriptors.ClassDescriptor;
|
||||
import org.jetbrains.jet.lang.descriptors.ConstructorDescriptor;
|
||||
import org.jetbrains.jet.lang.descriptors.PropertyDescriptor;
|
||||
import org.jetbrains.jet.lang.descriptors.SimpleFunctionDescriptor;
|
||||
import org.jetbrains.jet.lang.resolve.CompileTimeConstantUtils;
|
||||
import org.jetbrains.jet.lang.resolve.BindingContextUtils;
|
||||
import org.jetbrains.jet.lang.resolve.BindingTrace;
|
||||
import org.jetbrains.jet.lang.resolve.CompileTimeConstantUtils;
|
||||
import org.jetbrains.jet.lang.resolve.constants.CompileTimeConstant;
|
||||
import org.jetbrains.jet.lang.resolve.java.structure.JavaClass;
|
||||
import org.jetbrains.jet.lang.resolve.java.structure.JavaElement;
|
||||
@@ -94,9 +94,10 @@ public class TraceBasedJavaResolverCache implements JavaResolverCache {
|
||||
PsiExpression initializer = psiField.getInitializer();
|
||||
Object evaluatedExpression = JavaConstantExpressionEvaluator.computeConstantExpression(initializer, false);
|
||||
if (evaluatedExpression != null) {
|
||||
CompileTimeConstant<?> constant = JavaAnnotationArgumentResolver.
|
||||
resolveCompileTimeConstantValue(evaluatedExpression, CompileTimeConstantUtils
|
||||
.isPropertyCompileTimeConstant(descriptor), descriptor.getType());
|
||||
CompileTimeConstant<?> constant =
|
||||
ResolverPackage.resolveCompileTimeConstantValue(evaluatedExpression,
|
||||
CompileTimeConstantUtils.isPropertyCompileTimeConstant(descriptor),
|
||||
descriptor.getType());
|
||||
if (constant != null) {
|
||||
trace.record(COMPILE_TIME_INITIALIZER, descriptor, constant);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user