use of org.jetbrains.kotlin.js.backend.ast.JsNameRef in project kotlin by JetBrains.
the class VariableAccessTranslator method translateAsGet.
@NotNull
@Override
public JsExpression translateAsGet() {
JsExpression e = CallTranslator.INSTANCE.translateGet(context(), resolvedCall, receiver);
CallableDescriptor original = resolvedCall.getResultingDescriptor().getOriginal();
if (original instanceof PropertyDescriptor) {
PropertyGetterDescriptor getter = ((PropertyDescriptor) original).getGetter();
if (InlineUtil.isInline(getter)) {
if (e instanceof JsNameRef) {
// Get was translated as a name reference
setInlineCallMetadata((JsNameRef) e, referenceExpression, getter);
} else {
setInlineCallMetadata(e, referenceExpression, getter, context());
}
}
}
return e;
}
Aggregations