IR: keep local scope with counter maps across LDL invocations
Since LocalDeclarationsLowering is a BodyLoweringPass, local functions inside one declaration are handled independently of local functions in the other declaration. This can lead to name clashes, in case a local function with the same name and signature is declared in overloads in the same container, which results in a signature clash error in JVM IR. The issue became more common with the introduction of adapted function references, where psi2ir generates a local adapter-function with a predefined name, which can easily clash with another reference to the same target in an overload. This led to a compilation error when bootstrapping Kotlin with JVM IR, for example in GradleIRBuilder.kt where there are a lot of references to the same function.
This commit is contained in:
Generated
+10
@@ -2075,6 +2075,11 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
|
|||||||
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/noAdaptedReferencesIfNoOptimizedReferencesEnabled.kt");
|
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/noAdaptedReferencesIfNoOptimizedReferencesEnabled.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("noNameClashForReferencesToSameFunction.kt")
|
||||||
|
public void testNoNameClashForReferencesToSameFunction() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/noNameClashForReferencesToSameFunction.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("noReflectionForAdaptedCallableReferences.kt")
|
@TestMetadata("noReflectionForAdaptedCallableReferences.kt")
|
||||||
public void testNoReflectionForAdaptedCallableReferences() throws Exception {
|
public void testNoReflectionForAdaptedCallableReferences() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/noReflectionForAdaptedCallableReferences.kt");
|
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/noReflectionForAdaptedCallableReferences.kt");
|
||||||
@@ -11747,6 +11752,11 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
|
|||||||
runTest("compiler/testData/codegen/box/functions/localFunctions/nameClash.kt");
|
runTest("compiler/testData/codegen/box/functions/localFunctions/nameClash.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("nameClashAcrossDifferentContainers.kt")
|
||||||
|
public void testNameClashAcrossDifferentContainers() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/functions/localFunctions/nameClashAcrossDifferentContainers.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("overloadedLocalFunWithoutClosure.kt")
|
@TestMetadata("overloadedLocalFunWithoutClosure.kt")
|
||||||
public void testOverloadedLocalFunWithoutClosure() throws Exception {
|
public void testOverloadedLocalFunWithoutClosure() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/functions/localFunctions/overloadedLocalFunWithoutClosure.kt");
|
runTest("compiler/testData/codegen/box/functions/localFunctions/overloadedLocalFunWithoutClosure.kt");
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
package org.jetbrains.kotlin.backend.common.ir
|
package org.jetbrains.kotlin.backend.common.ir
|
||||||
|
|
||||||
import org.jetbrains.kotlin.backend.common.CommonBackendContext
|
import org.jetbrains.kotlin.backend.common.CommonBackendContext
|
||||||
|
import org.jetbrains.kotlin.backend.common.lower.LocalDeclarationsLowering
|
||||||
import org.jetbrains.kotlin.builtins.*
|
import org.jetbrains.kotlin.builtins.*
|
||||||
import org.jetbrains.kotlin.descriptors.ClassDescriptor
|
import org.jetbrains.kotlin.descriptors.ClassDescriptor
|
||||||
import org.jetbrains.kotlin.descriptors.SimpleFunctionDescriptor
|
import org.jetbrains.kotlin.descriptors.SimpleFunctionDescriptor
|
||||||
@@ -34,6 +35,8 @@ abstract class Ir<out T : CommonBackendContext>(val context: T, val irModule: Ir
|
|||||||
|
|
||||||
val defaultParameterDeclarationsCache = mutableMapOf<IrFunction, IrFunction>()
|
val defaultParameterDeclarationsCache = mutableMapOf<IrFunction, IrFunction>()
|
||||||
|
|
||||||
|
internal val localScopeWithCounterMap = LocalDeclarationsLowering.LocalScopeWithCounterMap()
|
||||||
|
|
||||||
// If irType is an inline class type, return the underlying type according to the
|
// If irType is an inline class type, return the underlying type according to the
|
||||||
// unfolding rules of the current backend. Otherwise, returns null.
|
// unfolding rules of the current backend. Otherwise, returns null.
|
||||||
open fun unfoldInlineClassType(irType: IrType): IrType? = null
|
open fun unfoldInlineClassType(irType: IrType): IrType? = null
|
||||||
|
|||||||
+24
-23
@@ -39,12 +39,15 @@ import org.jetbrains.kotlin.ir.types.impl.IrSimpleTypeImpl
|
|||||||
import org.jetbrains.kotlin.ir.types.impl.IrTypeAbbreviationImpl
|
import org.jetbrains.kotlin.ir.types.impl.IrTypeAbbreviationImpl
|
||||||
import org.jetbrains.kotlin.ir.types.impl.IrUninitializedType
|
import org.jetbrains.kotlin.ir.types.impl.IrUninitializedType
|
||||||
import org.jetbrains.kotlin.ir.types.impl.makeTypeProjection
|
import org.jetbrains.kotlin.ir.types.impl.makeTypeProjection
|
||||||
import org.jetbrains.kotlin.ir.util.*
|
import org.jetbrains.kotlin.ir.util.constructedClass
|
||||||
|
import org.jetbrains.kotlin.ir.util.file
|
||||||
|
import org.jetbrains.kotlin.ir.util.parentAsClass
|
||||||
import org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid
|
import org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid
|
||||||
import org.jetbrains.kotlin.ir.visitors.acceptChildrenVoid
|
import org.jetbrains.kotlin.ir.visitors.acceptChildrenVoid
|
||||||
import org.jetbrains.kotlin.ir.visitors.acceptVoid
|
import org.jetbrains.kotlin.ir.visitors.acceptVoid
|
||||||
import org.jetbrains.kotlin.ir.visitors.transformChildrenVoid
|
import org.jetbrains.kotlin.ir.visitors.transformChildrenVoid
|
||||||
import org.jetbrains.kotlin.name.Name
|
import org.jetbrains.kotlin.name.Name
|
||||||
|
import org.jetbrains.kotlin.utils.addToStdlib.safeAs
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
|
||||||
interface LocalNameProvider {
|
interface LocalNameProvider {
|
||||||
@@ -117,19 +120,22 @@ class LocalDeclarationsLowering(
|
|||||||
LocalDeclarationsTransformer(irElement, container, classesToLower).lowerLocalDeclarations()
|
LocalDeclarationsTransformer(irElement, container, classesToLower).lowerLocalDeclarations()
|
||||||
}
|
}
|
||||||
|
|
||||||
private class ScopeWithCounter(scope: Scope, irElement: IrElement) : ScopeWithIr(scope, irElement) {
|
internal class ScopeWithCounter(scope: Scope, irElement: IrElement) : ScopeWithIr(scope, irElement) {
|
||||||
// Continuous numbering across all declarations in the container.
|
// Continuous numbering across all declarations in the container.
|
||||||
var counter: Int = 0
|
var counter: Int = 0
|
||||||
|
val usedLocalFunctionNames: MutableSet<Name> = hashSetOf()
|
||||||
|
}
|
||||||
|
|
||||||
|
internal class LocalScopeWithCounterMap {
|
||||||
|
val scopeMap: MutableMap<IrSymbolOwner, ScopeWithCounter> = hashMapOf()
|
||||||
}
|
}
|
||||||
|
|
||||||
private val scopeMap: MutableMap<IrSymbolOwner, ScopeWithCounter> = mutableMapOf()
|
|
||||||
// Need to keep LocalFunctionContext.index
|
// Need to keep LocalFunctionContext.index
|
||||||
private val IrSymbolOwner.scopeWithCounter: ScopeWithCounter
|
private val IrSymbolOwner.scopeWithCounter: ScopeWithCounter
|
||||||
get() = scopeMap.getOrPut(this) {
|
get() = context.ir.localScopeWithCounterMap.scopeMap.getOrPut(this) {
|
||||||
ScopeWithCounter(Scope(symbol), this)
|
ScopeWithCounter(Scope(symbol), this)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private abstract class LocalContext {
|
private abstract class LocalContext {
|
||||||
val capturedTypeParameterToTypeParameter: MutableMap<IrTypeParameter, IrTypeParameter> = mutableMapOf()
|
val capturedTypeParameterToTypeParameter: MutableMap<IrTypeParameter, IrTypeParameter> = mutableMapOf()
|
||||||
|
|
||||||
@@ -229,7 +235,6 @@ class LocalDeclarationsLowering(
|
|||||||
val localFunctions: MutableMap<IrFunction, LocalFunctionContext> = LinkedHashMap()
|
val localFunctions: MutableMap<IrFunction, LocalFunctionContext> = LinkedHashMap()
|
||||||
val localClasses: MutableMap<IrClass, LocalClassContext> = LinkedHashMap()
|
val localClasses: MutableMap<IrClass, LocalClassContext> = LinkedHashMap()
|
||||||
val localClassConstructors: MutableMap<IrConstructor, LocalClassConstructorContext> = LinkedHashMap()
|
val localClassConstructors: MutableMap<IrConstructor, LocalClassConstructorContext> = LinkedHashMap()
|
||||||
val usedLocalFunctionNames: MutableSet<Name> = mutableSetOf()
|
|
||||||
|
|
||||||
val transformedDeclarations = mutableMapOf<IrSymbolOwner, IrDeclaration>()
|
val transformedDeclarations = mutableMapOf<IrSymbolOwner, IrDeclaration>()
|
||||||
|
|
||||||
@@ -832,19 +837,17 @@ class LocalDeclarationsLowering(
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun collectLocalDeclarations() {
|
private fun collectLocalDeclarations() {
|
||||||
val enclosingFileScope = container.file.scopeWithCounter
|
val enclosingFile = container.file
|
||||||
|
val enclosingClass = run {
|
||||||
val enclosingClassScope = run {
|
|
||||||
var currentParent = container as? IrClass ?: container.parent
|
var currentParent = container as? IrClass ?: container.parent
|
||||||
while (currentParent is IrDeclaration && currentParent !is IrClass) {
|
while (currentParent is IrDeclaration && currentParent !is IrClass) {
|
||||||
currentParent = currentParent.parent
|
currentParent = currentParent.parent
|
||||||
}
|
}
|
||||||
|
|
||||||
currentParent as? IrClass
|
currentParent as? IrClass
|
||||||
}?.scopeWithCounter
|
}
|
||||||
|
|
||||||
irElement.acceptVoid(object : IrElementVisitorVoidWithContext() {
|
irElement.acceptVoid(object : IrElementVisitorVoidWithContext() {
|
||||||
|
|
||||||
override fun visitElement(element: IrElement) {
|
override fun visitElement(element: IrElement) {
|
||||||
element.acceptChildrenVoid(this)
|
element.acceptChildrenVoid(this)
|
||||||
}
|
}
|
||||||
@@ -866,18 +869,16 @@ class LocalDeclarationsLowering(
|
|||||||
super.visitSimpleFunction(declaration)
|
super.visitSimpleFunction(declaration)
|
||||||
|
|
||||||
if (declaration.visibility == Visibilities.LOCAL) {
|
if (declaration.visibility == Visibilities.LOCAL) {
|
||||||
val scopeWithIr =
|
val enclosingScope =
|
||||||
(currentClass ?: enclosingClassScope ?: enclosingFileScope /*file is required for K/N cause file declarations are not split by classes*/
|
// File is required for K/N because file declarations are not split by classes.
|
||||||
?: error("No scope for ${declaration.dump()}"))
|
currentClass ?: enclosingClass?.scopeWithCounter ?: enclosingFile.scopeWithCounter
|
||||||
|
val index =
|
||||||
|
if (enclosingScope is ScopeWithCounter &&
|
||||||
|
(declaration.name.isSpecial || declaration.name in enclosingScope.usedLocalFunctionNames)
|
||||||
|
) enclosingScope.counter++ else -1
|
||||||
localFunctions[declaration] =
|
localFunctions[declaration] =
|
||||||
LocalFunctionContext(
|
LocalFunctionContext(declaration, index, enclosingScope.irElement as IrDeclarationContainer)
|
||||||
declaration,
|
(enclosingScope as? ScopeWithCounter)?.usedLocalFunctionNames?.add(declaration.name)
|
||||||
if (declaration.name.isSpecial || declaration.name in usedLocalFunctionNames)
|
|
||||||
(scopeWithIr as ScopeWithCounter).counter++
|
|
||||||
else -1,
|
|
||||||
scopeWithIr.irElement as IrDeclarationContainer
|
|
||||||
)
|
|
||||||
usedLocalFunctionNames.add(declaration.name)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -909,4 +910,4 @@ class LocalDeclarationsLowering(
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Local inner classes capture anything through outer
|
// Local inner classes capture anything through outer
|
||||||
internal fun IrClass.isLocalNotInner(): Boolean = visibility == Visibilities.LOCAL && !isInner
|
internal fun IrClass.isLocalNotInner(): Boolean = visibility == Visibilities.LOCAL && !isInner
|
||||||
|
|||||||
+26
@@ -0,0 +1,26 @@
|
|||||||
|
// IGNORE_BACKEND_FIR: JVM_IR
|
||||||
|
|
||||||
|
var result = ""
|
||||||
|
|
||||||
|
class C(val token: String) {
|
||||||
|
fun target(): Int {
|
||||||
|
result += token
|
||||||
|
return 42
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun adapt(f: () -> Unit): Unit = f()
|
||||||
|
|
||||||
|
fun overload() {
|
||||||
|
adapt(C("O")::target)
|
||||||
|
}
|
||||||
|
|
||||||
|
fun overload(unused: String) {
|
||||||
|
adapt(C("K")::target)
|
||||||
|
}
|
||||||
|
|
||||||
|
fun box(): String {
|
||||||
|
overload()
|
||||||
|
overload("")
|
||||||
|
return result
|
||||||
|
}
|
||||||
Vendored
+53
@@ -0,0 +1,53 @@
|
|||||||
|
// IGNORE_BACKEND_FIR: JVM_IR
|
||||||
|
|
||||||
|
var result = ""
|
||||||
|
|
||||||
|
fun overload() {
|
||||||
|
fun local() {
|
||||||
|
result += "1"
|
||||||
|
}
|
||||||
|
local()
|
||||||
|
}
|
||||||
|
|
||||||
|
fun overload(unused: String) {
|
||||||
|
fun local() {
|
||||||
|
result += "2"
|
||||||
|
}
|
||||||
|
local()
|
||||||
|
if ("".length < 1) {
|
||||||
|
fun local() {
|
||||||
|
result += "3"
|
||||||
|
}
|
||||||
|
local()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class C {
|
||||||
|
fun overload() {
|
||||||
|
fun local() {
|
||||||
|
result += "4"
|
||||||
|
}
|
||||||
|
local()
|
||||||
|
}
|
||||||
|
|
||||||
|
fun overload(unused: String) {
|
||||||
|
fun local() {
|
||||||
|
result += "5"
|
||||||
|
}
|
||||||
|
local()
|
||||||
|
if ("".length < 1) {
|
||||||
|
fun local() {
|
||||||
|
result += "6"
|
||||||
|
}
|
||||||
|
local()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun box(): String {
|
||||||
|
overload()
|
||||||
|
overload("")
|
||||||
|
C().overload()
|
||||||
|
C().overload("")
|
||||||
|
return if (result == "123456") "OK" else "Fail: $result"
|
||||||
|
}
|
||||||
+10
@@ -2095,6 +2095,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
|||||||
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/noAdaptedReferencesIfNoOptimizedReferencesEnabled.kt");
|
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/noAdaptedReferencesIfNoOptimizedReferencesEnabled.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("noNameClashForReferencesToSameFunction.kt")
|
||||||
|
public void testNoNameClashForReferencesToSameFunction() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/noNameClashForReferencesToSameFunction.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("noReflectionForAdaptedCallableReferences.kt")
|
@TestMetadata("noReflectionForAdaptedCallableReferences.kt")
|
||||||
public void testNoReflectionForAdaptedCallableReferences() throws Exception {
|
public void testNoReflectionForAdaptedCallableReferences() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/noReflectionForAdaptedCallableReferences.kt");
|
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/noReflectionForAdaptedCallableReferences.kt");
|
||||||
@@ -12962,6 +12967,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
|||||||
runTest("compiler/testData/codegen/box/functions/localFunctions/nameClash.kt");
|
runTest("compiler/testData/codegen/box/functions/localFunctions/nameClash.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("nameClashAcrossDifferentContainers.kt")
|
||||||
|
public void testNameClashAcrossDifferentContainers() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/functions/localFunctions/nameClashAcrossDifferentContainers.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("overloadedLocalFunWithoutClosure.kt")
|
@TestMetadata("overloadedLocalFunWithoutClosure.kt")
|
||||||
public void testOverloadedLocalFunWithoutClosure() throws Exception {
|
public void testOverloadedLocalFunWithoutClosure() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/functions/localFunctions/overloadedLocalFunWithoutClosure.kt");
|
runTest("compiler/testData/codegen/box/functions/localFunctions/overloadedLocalFunWithoutClosure.kt");
|
||||||
|
|||||||
+10
@@ -2095,6 +2095,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
|||||||
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/noAdaptedReferencesIfNoOptimizedReferencesEnabled.kt");
|
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/noAdaptedReferencesIfNoOptimizedReferencesEnabled.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("noNameClashForReferencesToSameFunction.kt")
|
||||||
|
public void testNoNameClashForReferencesToSameFunction() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/noNameClashForReferencesToSameFunction.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("noReflectionForAdaptedCallableReferences.kt")
|
@TestMetadata("noReflectionForAdaptedCallableReferences.kt")
|
||||||
public void testNoReflectionForAdaptedCallableReferences() throws Exception {
|
public void testNoReflectionForAdaptedCallableReferences() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/noReflectionForAdaptedCallableReferences.kt");
|
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/noReflectionForAdaptedCallableReferences.kt");
|
||||||
@@ -12962,6 +12967,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
|||||||
runTest("compiler/testData/codegen/box/functions/localFunctions/nameClash.kt");
|
runTest("compiler/testData/codegen/box/functions/localFunctions/nameClash.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("nameClashAcrossDifferentContainers.kt")
|
||||||
|
public void testNameClashAcrossDifferentContainers() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/functions/localFunctions/nameClashAcrossDifferentContainers.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("overloadedLocalFunWithoutClosure.kt")
|
@TestMetadata("overloadedLocalFunWithoutClosure.kt")
|
||||||
public void testOverloadedLocalFunWithoutClosure() throws Exception {
|
public void testOverloadedLocalFunWithoutClosure() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/functions/localFunctions/overloadedLocalFunWithoutClosure.kt");
|
runTest("compiler/testData/codegen/box/functions/localFunctions/overloadedLocalFunWithoutClosure.kt");
|
||||||
|
|||||||
+10
@@ -2075,6 +2075,11 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
|||||||
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/noAdaptedReferencesIfNoOptimizedReferencesEnabled.kt");
|
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/noAdaptedReferencesIfNoOptimizedReferencesEnabled.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("noNameClashForReferencesToSameFunction.kt")
|
||||||
|
public void testNoNameClashForReferencesToSameFunction() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/noNameClashForReferencesToSameFunction.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("noReflectionForAdaptedCallableReferences.kt")
|
@TestMetadata("noReflectionForAdaptedCallableReferences.kt")
|
||||||
public void testNoReflectionForAdaptedCallableReferences() throws Exception {
|
public void testNoReflectionForAdaptedCallableReferences() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/noReflectionForAdaptedCallableReferences.kt");
|
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/noReflectionForAdaptedCallableReferences.kt");
|
||||||
@@ -11747,6 +11752,11 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
|||||||
runTest("compiler/testData/codegen/box/functions/localFunctions/nameClash.kt");
|
runTest("compiler/testData/codegen/box/functions/localFunctions/nameClash.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("nameClashAcrossDifferentContainers.kt")
|
||||||
|
public void testNameClashAcrossDifferentContainers() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/functions/localFunctions/nameClashAcrossDifferentContainers.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("overloadedLocalFunWithoutClosure.kt")
|
@TestMetadata("overloadedLocalFunWithoutClosure.kt")
|
||||||
public void testOverloadedLocalFunWithoutClosure() throws Exception {
|
public void testOverloadedLocalFunWithoutClosure() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/functions/localFunctions/overloadedLocalFunWithoutClosure.kt");
|
runTest("compiler/testData/codegen/box/functions/localFunctions/overloadedLocalFunWithoutClosure.kt");
|
||||||
|
|||||||
Generated
+10
@@ -1515,6 +1515,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
|||||||
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/manyDefaultsAndVararg.kt");
|
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/manyDefaultsAndVararg.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("noNameClashForReferencesToSameFunction.kt")
|
||||||
|
public void testNoNameClashForReferencesToSameFunction() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/noNameClashForReferencesToSameFunction.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("simpleDefaultArgument.kt")
|
@TestMetadata("simpleDefaultArgument.kt")
|
||||||
public void testSimpleDefaultArgument() throws Exception {
|
public void testSimpleDefaultArgument() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/simpleDefaultArgument.kt");
|
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/simpleDefaultArgument.kt");
|
||||||
@@ -10122,6 +10127,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
|||||||
runTest("compiler/testData/codegen/box/functions/localFunctions/nameClash.kt");
|
runTest("compiler/testData/codegen/box/functions/localFunctions/nameClash.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("nameClashAcrossDifferentContainers.kt")
|
||||||
|
public void testNameClashAcrossDifferentContainers() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/functions/localFunctions/nameClashAcrossDifferentContainers.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("overloadedLocalFunWithoutClosure.kt")
|
@TestMetadata("overloadedLocalFunWithoutClosure.kt")
|
||||||
public void testOverloadedLocalFunWithoutClosure() throws Exception {
|
public void testOverloadedLocalFunWithoutClosure() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/functions/localFunctions/overloadedLocalFunWithoutClosure.kt");
|
runTest("compiler/testData/codegen/box/functions/localFunctions/overloadedLocalFunWithoutClosure.kt");
|
||||||
|
|||||||
+10
@@ -1515,6 +1515,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
|||||||
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/manyDefaultsAndVararg.kt");
|
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/manyDefaultsAndVararg.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("noNameClashForReferencesToSameFunction.kt")
|
||||||
|
public void testNoNameClashForReferencesToSameFunction() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/noNameClashForReferencesToSameFunction.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("simpleDefaultArgument.kt")
|
@TestMetadata("simpleDefaultArgument.kt")
|
||||||
public void testSimpleDefaultArgument() throws Exception {
|
public void testSimpleDefaultArgument() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/simpleDefaultArgument.kt");
|
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/simpleDefaultArgument.kt");
|
||||||
@@ -10122,6 +10127,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
|||||||
runTest("compiler/testData/codegen/box/functions/localFunctions/nameClash.kt");
|
runTest("compiler/testData/codegen/box/functions/localFunctions/nameClash.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("nameClashAcrossDifferentContainers.kt")
|
||||||
|
public void testNameClashAcrossDifferentContainers() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/functions/localFunctions/nameClashAcrossDifferentContainers.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("overloadedLocalFunWithoutClosure.kt")
|
@TestMetadata("overloadedLocalFunWithoutClosure.kt")
|
||||||
public void testOverloadedLocalFunWithoutClosure() throws Exception {
|
public void testOverloadedLocalFunWithoutClosure() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/functions/localFunctions/overloadedLocalFunWithoutClosure.kt");
|
runTest("compiler/testData/codegen/box/functions/localFunctions/overloadedLocalFunWithoutClosure.kt");
|
||||||
|
|||||||
Reference in New Issue
Block a user