Minor. Fix compilation.

This commit is contained in:
Stanislav Erokhin
2015-09-19 00:39:37 +03:00
parent fc9aa87a05
commit cdcf9f30b7
3 changed files with 3 additions and 6 deletions
@@ -16,7 +16,6 @@
package org.jetbrains.kotlin.psi
import com.intellij.lang.ASTNode
import com.intellij.lang.ASTNode
import com.intellij.navigation.ItemPresentation
import com.intellij.navigation.ItemPresentationProviders
@@ -43,7 +43,6 @@ import org.jetbrains.kotlin.js.translate.utils.PsiUtils.getPrimaryConstructorPar
import org.jetbrains.kotlin.js.translate.utils.TranslationUtils.simpleReturnFunction
import org.jetbrains.kotlin.js.translate.utils.jsAstUtils.toInvocationWith
import org.jetbrains.kotlin.psi.JetClass
import org.jetbrains.kotlin.psi.JetClass
import org.jetbrains.kotlin.psi.JetClassOrObject
import org.jetbrains.kotlin.psi.JetObjectDeclaration
import org.jetbrains.kotlin.psi.JetSecondaryConstructor
@@ -30,7 +30,6 @@ import org.jetbrains.kotlin.js.translate.utils.JsDescriptorUtils
import org.jetbrains.kotlin.js.translate.context.Namer.*
import org.jetbrains.kotlin.js.translate.utils.jsAstUtils.*
import org.jetbrains.kotlin.js.translate.utils.TranslationUtils.*
import org.jetbrains.kotlin.resolve.DescriptorUtils.isExtension
import org.jetbrains.kotlin.resolve.calls.model.ResolvedCall
import org.jetbrains.kotlin.resolve.descriptorUtil.isExtension
@@ -64,7 +63,7 @@ public fun MutableList<JsPropertyInitializer>.addGetterAndSetter(
generateSetter: () -> JsPropertyInitializer
) {
val to: MutableList<JsPropertyInitializer>
if (!isExtension(descriptor)) {
if (!descriptor.isExtension) {
to = SmartList<JsPropertyInitializer>()
this.add(JsPropertyInitializer(context.getNameForDescriptor(descriptor).makeRef(), JsObjectLiteral(to, true)))
}
@@ -138,7 +137,7 @@ private class PropertyTranslator(
val delegateRef = getDelegateNameRef(propertyName)
val delegatedJsCall = CallTranslator.translate(context(), delegatedCall, delegateRef)
if (isExtension(getterDescriptor)) {
if (getterDescriptor.isExtension) {
val receiver = function.addParameter(getReceiverParameterName()).getName()
val arguments = (delegatedJsCall as JsInvocation).getArguments()
arguments.set(0, receiver.makeRef())
@@ -168,7 +167,7 @@ private class PropertyTranslator(
val delegatedJsCall = CallTranslator.translate(withAliased, delegatedCall, getDelegateNameRef(correspondingPropertyName))
function.addStatement(delegatedJsCall.makeStmt())
if (isExtension(setterDescriptor)) {
if (setterDescriptor.isExtension) {
val receiver = function.addParameter(getReceiverParameterName(), 0).getName()
(delegatedJsCall as JsInvocation).getArguments().set(0, receiver.makeRef())
}