From ecb5d29130417ee3f58d6f07828af9db35ca39e1 Mon Sep 17 00:00:00 2001 From: Mikhael Bogdanov Date: Wed, 27 Jun 2018 13:26:44 +0300 Subject: [PATCH] Add additional IrFunction constructor with custom visibility and modality (cherry picked from commit 0664d77) --- .../ir/declarations/impl/IrFunctionImpl.kt | 23 ++++++------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/impl/IrFunctionImpl.kt b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/impl/IrFunctionImpl.kt index 7380477c1d5..7081a64653e 100644 --- a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/impl/IrFunctionImpl.kt +++ b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/impl/IrFunctionImpl.kt @@ -1,17 +1,6 @@ /* - * Copyright 2010-2016 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * 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.ir.declarations.impl @@ -50,12 +39,14 @@ class IrFunctionImpl( startOffset: Int, endOffset: Int, origin: IrDeclarationOrigin, - symbol: IrSimpleFunctionSymbol + symbol: IrSimpleFunctionSymbol, + visibility: Visibility = symbol.descriptor.visibility, + modality: Modality = symbol.descriptor.modality ) : this( startOffset, endOffset, origin, symbol, symbol.descriptor.name, - symbol.descriptor.visibility, - symbol.descriptor.modality, + visibility, + modality, symbol.descriptor.isInline, symbol.descriptor.isExternal, symbol.descriptor.isTailrec,