Don't use descriptors for static check

This commit is contained in:
Mikhael Bogdanov
2018-04-24 15:12:05 +02:00
parent 096c9e440b
commit 655b737a1e
2 changed files with 13 additions and 1 deletions
@@ -54,7 +54,7 @@ open class FunctionCodegen(private val irFunction: IrFunction, private val class
private fun doGenerate() {
val signature = classCodegen.typeMapper.mapSignatureWithGeneric(descriptor, OwnerKind.IMPLEMENTATION)
val isStatic = DescriptorUtils.isStaticDeclaration(descriptor)
val isStatic = irFunction.isStatic
val frameMap = createFrameMapWithReceivers(classCodegen.state, descriptor, signature, isStatic)
@@ -0,0 +1,12 @@
/*
* Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
* that can be found in the license/LICENSE.txt file.
*/
package org.jetbrains.kotlin.backend.jvm.codegen
import org.jetbrains.kotlin.ir.declarations.IrConstructor
import org.jetbrains.kotlin.ir.declarations.IrFunction
internal val IrFunction.isStatic
get() = this.dispatchReceiverParameter == null && this !is IrConstructor