[Common IR] Do not add internal methods to overrides
[JS IR] Use a module name in JsFunctionSignature for internal methods ^KT-60635 Fixed
This commit is contained in:
committed by
Space Team
parent
788fa5d545
commit
7a31167e0b
+6
@@ -921,6 +921,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
|
||||
runTest("compiler/testData/diagnostics/tests/publishedApi.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("publishedApiOverride.kt")
|
||||
public void testPublishedApiOverride() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/publishedApiOverride.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("QualifiedExpressions.kt")
|
||||
public void testQualifiedExpressions() throws Exception {
|
||||
|
||||
+6
@@ -921,6 +921,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
|
||||
runTest("compiler/testData/diagnostics/tests/publishedApi.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("publishedApiOverride.kt")
|
||||
public void testPublishedApiOverride() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/publishedApiOverride.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("QualifiedExpressions.kt")
|
||||
public void testQualifiedExpressions() throws Exception {
|
||||
|
||||
+6
@@ -921,6 +921,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
|
||||
runTest("compiler/testData/diagnostics/tests/publishedApi.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("publishedApiOverride.kt")
|
||||
public void testPublishedApiOverride() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/publishedApiOverride.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("QualifiedExpressions.kt")
|
||||
public void testQualifiedExpressions() throws Exception {
|
||||
|
||||
+6
@@ -921,6 +921,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
|
||||
runTest("compiler/testData/diagnostics/tests/publishedApi.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("publishedApiOverride.kt")
|
||||
public void testPublishedApiOverride() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/publishedApiOverride.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("QualifiedExpressions.kt")
|
||||
public void testQualifiedExpressions() throws Exception {
|
||||
|
||||
+24
@@ -2387,6 +2387,30 @@ public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTr
|
||||
runTest("compiler/testData/codegen/box/bridges/innerClassTypeParameters.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("internalMethodOverrideInFriendModule.kt")
|
||||
public void testInternalMethodOverrideInFriendModule() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/bridges/internalMethodOverrideInFriendModule.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("internalMethodOverrideInOtherModule.kt")
|
||||
public void testInternalMethodOverrideInOtherModule() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/bridges/internalMethodOverrideInOtherModule.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("internalMethodOverrideMultipleInheritance.kt")
|
||||
public void testInternalMethodOverrideMultipleInheritance() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/bridges/internalMethodOverrideMultipleInheritance.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("internalMethodOverridePublishedApi.kt")
|
||||
public void testInternalMethodOverridePublishedApi() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/bridges/internalMethodOverridePublishedApi.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt12416.kt")
|
||||
public void testKt12416() throws Exception {
|
||||
|
||||
+24
@@ -2387,6 +2387,30 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo
|
||||
runTest("compiler/testData/codegen/box/bridges/innerClassTypeParameters.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("internalMethodOverrideInFriendModule.kt")
|
||||
public void testInternalMethodOverrideInFriendModule() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/bridges/internalMethodOverrideInFriendModule.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("internalMethodOverrideInOtherModule.kt")
|
||||
public void testInternalMethodOverrideInOtherModule() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/bridges/internalMethodOverrideInOtherModule.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("internalMethodOverrideMultipleInheritance.kt")
|
||||
public void testInternalMethodOverrideMultipleInheritance() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/bridges/internalMethodOverrideMultipleInheritance.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("internalMethodOverridePublishedApi.kt")
|
||||
public void testInternalMethodOverridePublishedApi() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/bridges/internalMethodOverridePublishedApi.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt12416.kt")
|
||||
public void testKt12416() throws Exception {
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
package org.jetbrains.kotlin.ir.backend.js
|
||||
|
||||
import org.jetbrains.kotlin.ir.declarations.IrDeclarationOrigin
|
||||
import org.jetbrains.kotlin.ir.declarations.IrDeclarationOriginImpl
|
||||
|
||||
object JsLoweredDeclarationOrigin {
|
||||
@@ -18,4 +19,11 @@ object JsLoweredDeclarationOrigin {
|
||||
object JS_SUPER_CONTEXT_PARAMETER : IrDeclarationOriginImpl("JS_SUPER_CONTEXT_PARAMETER")
|
||||
object JS_SHADOWED_DEFAULT_PARAMETER : IrDeclarationOriginImpl("JS_SHADOWED_DEFAULT_PARAMETER")
|
||||
object ENUM_GET_INSTANCE_FUNCTION : IrDeclarationOriginImpl("ENUM_GET_INSTANCE_FUNCTION")
|
||||
|
||||
fun isBridgeDeclarationOrigin(origin: IrDeclarationOrigin) = when (origin) {
|
||||
is BRIDGE_WITH_STABLE_NAME -> true
|
||||
is BRIDGE_WITHOUT_STABLE_NAME -> true
|
||||
is BRIDGE_PROPERTY_ACCESSOR -> true
|
||||
else -> false
|
||||
}
|
||||
}
|
||||
|
||||
+5
-1
@@ -23,6 +23,7 @@ import org.jetbrains.kotlin.ir.types.IrType
|
||||
import org.jetbrains.kotlin.ir.types.classifierOrNull
|
||||
import org.jetbrains.kotlin.ir.util.*
|
||||
import org.jetbrains.kotlin.utils.memoryOptimizedPlus
|
||||
import org.jetbrains.kotlin.utils.toSmartList
|
||||
|
||||
/**
|
||||
* Constructs bridges for inherited generic functions
|
||||
@@ -148,7 +149,10 @@ abstract class BridgesConstruction<T : JsCommonBackendContext>(val context: T) :
|
||||
annotations = annotations memoryOptimizedPlus bridge.annotations
|
||||
// the js function signature building process (jsFunctionSignature()) uses dfs throught overriddenSymbols for getting js name,
|
||||
// therefore it is very important to put bridge symbol at the beginning, it allows to get correct js function name
|
||||
overriddenSymbols = overriddenSymbols memoryOptimizedPlus bridge.symbol memoryOptimizedPlus delegateTo.overriddenSymbols
|
||||
overriddenSymbols = mutableSetOf(bridge.symbol).also {
|
||||
it.addAll(overriddenSymbols)
|
||||
it.addAll(delegateTo.overriddenSymbols)
|
||||
}.toSmartList()
|
||||
}
|
||||
|
||||
irFunction.body = context.irFactory.createBlockBody(UNDEFINED_OFFSET, UNDEFINED_OFFSET) {
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
package org.jetbrains.kotlin.ir.backend.js.utils
|
||||
|
||||
import org.jetbrains.kotlin.descriptors.DescriptorVisibilities.INTERNAL
|
||||
import org.jetbrains.kotlin.ir.IrElement
|
||||
import org.jetbrains.kotlin.ir.backend.js.JsIrBackendContext
|
||||
import org.jetbrains.kotlin.ir.backend.js.JsLoweredDeclarationOrigin
|
||||
@@ -123,12 +124,28 @@ private fun List<IrType>.joinTypes(context: JsIrBackendContext): String {
|
||||
return joinToString("$", "$") { superType -> superType.asString(context) }
|
||||
}
|
||||
|
||||
private fun IrFunction.findOriginallyContainingModule(): IrModuleFragment? {
|
||||
if (JsLoweredDeclarationOrigin.isBridgeDeclarationOrigin(origin)) {
|
||||
val thisSimpleFunction = this as? IrSimpleFunction ?: error("Bridge must be IrSimpleFunction")
|
||||
val bridgeFrom = thisSimpleFunction.overriddenSymbols.firstOrNull() ?: error("Couldn't find the overridden function for the bridge")
|
||||
return bridgeFrom.owner.findOriginallyContainingModule()
|
||||
}
|
||||
return (getPackageFragment() as? IrFile)?.module
|
||||
}
|
||||
|
||||
fun calculateJsFunctionSignature(declaration: IrFunction, context: JsIrBackendContext): String {
|
||||
val declarationName = declaration.nameIfPropertyAccessor() ?: declaration.getJsNameOrKotlinName().asString()
|
||||
|
||||
val nameBuilder = StringBuilder()
|
||||
nameBuilder.append(declarationName)
|
||||
|
||||
if (declaration.visibility === INTERNAL && declaration.parentClassOrNull != null) {
|
||||
val containingModule = declaration.findOriginallyContainingModule()
|
||||
if (containingModule != null) {
|
||||
nameBuilder.append("_\$m_").append(containingModule.name.toString())
|
||||
}
|
||||
}
|
||||
|
||||
// TODO should we skip type parameters and use upper bound of type parameter when print type of value parameters?
|
||||
declaration.typeParameters.ifNotEmpty {
|
||||
nameBuilder.append("_\$t")
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
package org.jetbrains.kotlin.ir.overrides
|
||||
|
||||
import org.jetbrains.kotlin.builtins.StandardNames
|
||||
import org.jetbrains.kotlin.descriptors.*
|
||||
import org.jetbrains.kotlin.ir.ObsoleteDescriptorBasedAPI
|
||||
import org.jetbrains.kotlin.ir.declarations.*
|
||||
@@ -101,7 +102,8 @@ fun buildFakeOverrideMember(
|
||||
return CopyIrTreeWithSymbolsForFakeOverrides(member, substitutionMap, clazz, unimplementedOverridesStrategy)
|
||||
.copy()
|
||||
.apply {
|
||||
if (isPrivateToThisModule(clazz, classifier.owner, friendModules))
|
||||
val isInvisible = isPrivateToThisModule(clazz, classifier.owner, friendModules)
|
||||
if (isInvisible && !member.annotations.hasAnnotation(StandardNames.FqNames.publishedApi))
|
||||
visibility = DescriptorVisibilities.INVISIBLE_FAKE
|
||||
}
|
||||
}
|
||||
@@ -249,7 +251,8 @@ class IrOverridingUtil(
|
||||
// Note: We do allow overriding multiple FOs at once one of which is `isInline=true`.
|
||||
when (isOverridableBy(fromSupertype, fromCurrent, checkIsInlineFlag = true, checkReturnType = false).result) {
|
||||
OverrideCompatibilityInfo.Result.OVERRIDABLE -> {
|
||||
if (isVisibleForOverride(fromCurrent, fromSupertype.original))
|
||||
val isVisibleFake = fromSupertype.visibility != DescriptorVisibilities.INVISIBLE_FAKE
|
||||
if (isVisibleFake && isVisibleForOverride(fromCurrent, fromSupertype.original))
|
||||
overridden += fromSupertype
|
||||
bound += fromSupertype
|
||||
}
|
||||
|
||||
+75
@@ -0,0 +1,75 @@
|
||||
// IGNORE_BACKEND: WASM
|
||||
// WITH_STDLIB
|
||||
|
||||
// MODULE: lib1
|
||||
|
||||
// FILE: Demo.kt
|
||||
var DemoOpenSetterCalls = 0
|
||||
var DemoOpenGetterCalls = 0
|
||||
|
||||
abstract class Demo {
|
||||
internal open fun demoOpenFun(): Int = 5
|
||||
internal open val demoOpenVal: Int = 6
|
||||
internal open val demoOpenValGet: Int
|
||||
get() = 7
|
||||
internal open var demoOpenVarSetGet: Int = 8
|
||||
set(value) { ++DemoOpenSetterCalls; field = value }
|
||||
get() { ++DemoOpenGetterCalls; return field }
|
||||
}
|
||||
|
||||
// FILE: TestDemo.kt
|
||||
fun testOpenFun(d: Demo): Int = d.demoOpenFun()
|
||||
fun testOpenVal(d: Demo): Int = d.demoOpenVal
|
||||
fun testOpenValGet(d: Demo): Int = d.demoOpenValGet
|
||||
fun testOpenVarGet(d: Demo): Int = d.demoOpenVarSetGet
|
||||
fun testOpenVarSet(d: Demo, v: Int) { d.demoOpenVarSetGet = v }
|
||||
|
||||
// MODULE: main()(lib1)
|
||||
|
||||
// FILE: MyDemo.kt
|
||||
var MyDemoOpenSetterCalls = 0
|
||||
var MyDemoOpenGetterCalls = 0
|
||||
|
||||
class MyDemo : Demo() {
|
||||
override fun demoOpenFun(): Int = 100 * super.demoOpenFun()
|
||||
override val demoOpenVal: Int = 600
|
||||
override val demoOpenValGet: Int
|
||||
get() = 110 * super.demoOpenValGet
|
||||
override var demoOpenVarSetGet: Int
|
||||
set(value) { ++MyDemoOpenSetterCalls; super.demoOpenVarSetGet = value }
|
||||
get() { ++MyDemoOpenGetterCalls; return 111 * super.demoOpenVarSetGet }
|
||||
}
|
||||
|
||||
// FILE: Box.kt
|
||||
import kotlin.test.assertEquals
|
||||
|
||||
fun testMyDemo() {
|
||||
val myDemo = MyDemo()
|
||||
|
||||
assertEquals(testOpenFun(myDemo), 500)
|
||||
assertEquals(testOpenVal(myDemo), 600)
|
||||
assertEquals(testOpenValGet(myDemo), 770)
|
||||
assertEquals(testOpenVarGet(myDemo), 888)
|
||||
testOpenVarSet(myDemo, -8)
|
||||
assertEquals(testOpenVarGet(myDemo), -888)
|
||||
assertEquals(DemoOpenSetterCalls, 1)
|
||||
assertEquals(DemoOpenGetterCalls, 2)
|
||||
assertEquals(MyDemoOpenSetterCalls, 1)
|
||||
assertEquals(MyDemoOpenGetterCalls, 2)
|
||||
|
||||
assertEquals(myDemo.demoOpenFun(), 500)
|
||||
assertEquals(myDemo.demoOpenVal, 600)
|
||||
assertEquals(myDemo.demoOpenValGet, 770)
|
||||
assertEquals(myDemo.demoOpenVarSetGet, -888)
|
||||
myDemo.demoOpenVarSetGet = -9
|
||||
assertEquals(myDemo.demoOpenVarSetGet, -999)
|
||||
assertEquals(DemoOpenSetterCalls, 2)
|
||||
assertEquals(DemoOpenGetterCalls, 4)
|
||||
assertEquals(MyDemoOpenSetterCalls, 2)
|
||||
assertEquals(MyDemoOpenGetterCalls, 4)
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
testMyDemo()
|
||||
return "OK"
|
||||
}
|
||||
+272
@@ -0,0 +1,272 @@
|
||||
// WITH_STDLIB
|
||||
|
||||
// MODULE: lib1
|
||||
|
||||
// FILE: Demo.kt
|
||||
var DemoSetterCalls = 0
|
||||
var DemoGetterCalls = 0
|
||||
var DemoOpenSetterCalls = 0
|
||||
var DemoOpenGetterCalls = 0
|
||||
|
||||
abstract class Demo {
|
||||
internal fun demoFun(): Int = 1
|
||||
internal val demoVal: Int = 2
|
||||
internal val demoValGet: Int
|
||||
get() = 3
|
||||
internal var demoVarSetGet: Int = 4
|
||||
set(value) { ++DemoSetterCalls; field = value }
|
||||
get() { ++DemoGetterCalls; return field }
|
||||
|
||||
internal open fun demoOpenFun(): Int = 5
|
||||
internal open val demoOpenVal: Int = 6
|
||||
internal open val demoOpenValGet: Int
|
||||
get() = 7
|
||||
internal open var demoOpenVarSetGet: Int = 8
|
||||
set(value) { ++DemoOpenSetterCalls; field = value }
|
||||
get() { ++DemoOpenGetterCalls; return field }
|
||||
}
|
||||
|
||||
// FILE: LibDemo.kt
|
||||
var LibDemoOpenSetterCalls = 0
|
||||
var LibDemoOpenGetterCalls = 0
|
||||
|
||||
open class LibDemo : Demo() {
|
||||
override public fun demoOpenFun(): Int = 50
|
||||
override public val demoOpenVal: Int = 60
|
||||
override public val demoOpenValGet: Int
|
||||
get() = 70
|
||||
override public var demoOpenVarSetGet: Int = 80
|
||||
set(value) { ++LibDemoOpenSetterCalls; field = value }
|
||||
get() { ++LibDemoOpenGetterCalls; return field }
|
||||
}
|
||||
|
||||
// FILE: TestDemo.kt
|
||||
fun testFun(d: Demo): Int = d.demoFun()
|
||||
fun testVal(d: Demo): Int = d.demoVal
|
||||
fun testValGet(d: Demo): Int = d.demoValGet
|
||||
fun testVarGet(d: Demo): Int = d.demoVarSetGet
|
||||
fun testVarSet(d: Demo, v: Int) { d.demoVarSetGet = v }
|
||||
|
||||
fun testOpenFun(d: Demo): Int = d.demoOpenFun()
|
||||
fun testOpenVal(d: Demo): Int = d.demoOpenVal
|
||||
fun testOpenValGet(d: Demo): Int = d.demoOpenValGet
|
||||
fun testOpenVarGet(d: Demo): Int = d.demoOpenVarSetGet
|
||||
fun testOpenVarSet(d: Demo, v: Int) { d.demoOpenVarSetGet = v }
|
||||
|
||||
// MODULE: main(lib1)
|
||||
|
||||
// FILE: MyDemo.kt
|
||||
var MyDemoSetterCalls = 0
|
||||
var MyDemoGetterCalls = 0
|
||||
var MyDemoOpenSetterCalls = 0
|
||||
var MyDemoOpenGetterCalls = 0
|
||||
|
||||
class MyDemo : Demo() {
|
||||
fun demoFun(): Int = 100
|
||||
val demoVal: Int = 200
|
||||
val demoValGet: Int
|
||||
get() = 300
|
||||
var demoVarSetGet: Int = 400
|
||||
set(value) { ++MyDemoSetterCalls; field = value }
|
||||
get() { ++MyDemoGetterCalls; return field }
|
||||
|
||||
fun demoOpenFun(): Int = 500
|
||||
val demoOpenVal: Int = 600
|
||||
val demoOpenValGet: Int
|
||||
get() = 700
|
||||
var demoOpenVarSetGet: Int = 800
|
||||
set(value) { ++MyDemoOpenSetterCalls; field = value }
|
||||
get() { ++MyDemoOpenGetterCalls; return field }
|
||||
}
|
||||
|
||||
// FILE: MyDemo2.kt
|
||||
var MyDemo2SetterCalls = 0
|
||||
var MyDemo2GetterCalls = 0
|
||||
var MyDemo2OpenSetterCalls = 0
|
||||
var MyDemo2OpenGetterCalls = 0
|
||||
|
||||
class MyDemo2 : LibDemo() {
|
||||
fun demoFun(): Int = 1000
|
||||
val demoVal: Int = 2000
|
||||
val demoValGet: Int
|
||||
get() = 3000
|
||||
var demoVarSetGet: Int = 4000
|
||||
set(value) { ++MyDemo2SetterCalls; field = value }
|
||||
get() { ++MyDemo2GetterCalls; return field }
|
||||
|
||||
override fun demoOpenFun(): Int = 5000
|
||||
override val demoOpenVal: Int = 6000
|
||||
override val demoOpenValGet: Int
|
||||
get() = 7000
|
||||
override var demoOpenVarSetGet: Int = 8000
|
||||
set(value) { ++MyDemo2OpenSetterCalls; field = value }
|
||||
get() { ++MyDemo2OpenGetterCalls; return field }
|
||||
}
|
||||
|
||||
// FILE: Box.kt
|
||||
import kotlin.test.assertEquals
|
||||
|
||||
fun resetCounters() {
|
||||
DemoSetterCalls = 0
|
||||
DemoGetterCalls = 0
|
||||
DemoOpenSetterCalls = 0
|
||||
DemoOpenGetterCalls = 0
|
||||
|
||||
LibDemoOpenSetterCalls = 0
|
||||
LibDemoOpenGetterCalls = 0
|
||||
|
||||
MyDemoSetterCalls = 0
|
||||
MyDemoGetterCalls = 0
|
||||
MyDemoOpenSetterCalls = 0
|
||||
MyDemoOpenGetterCalls = 0
|
||||
|
||||
MyDemo2SetterCalls = 0
|
||||
MyDemo2GetterCalls = 0
|
||||
MyDemo2OpenSetterCalls = 0
|
||||
MyDemo2OpenGetterCalls = 0
|
||||
}
|
||||
|
||||
fun testMyDemo() {
|
||||
resetCounters()
|
||||
val myDemo = MyDemo()
|
||||
|
||||
assertEquals(testFun(myDemo), 1)
|
||||
assertEquals(testVal(myDemo), 2)
|
||||
assertEquals(testValGet(myDemo), 3)
|
||||
assertEquals(testVarGet(myDemo), 4)
|
||||
testVarSet(myDemo, -4)
|
||||
assertEquals(testVarGet(myDemo), -4)
|
||||
assertEquals(DemoSetterCalls, 1)
|
||||
assertEquals(DemoGetterCalls, 2)
|
||||
assertEquals(MyDemoSetterCalls, 0)
|
||||
assertEquals(MyDemoGetterCalls, 0)
|
||||
|
||||
assertEquals(testOpenFun(myDemo), 5)
|
||||
assertEquals(testOpenVal(myDemo), 6)
|
||||
assertEquals(testOpenValGet(myDemo), 7)
|
||||
assertEquals(testOpenVarGet(myDemo), 8)
|
||||
testOpenVarSet(myDemo, -8)
|
||||
assertEquals(testOpenVarGet(myDemo), -8)
|
||||
assertEquals(DemoOpenSetterCalls, 1)
|
||||
assertEquals(DemoOpenGetterCalls, 2)
|
||||
assertEquals(MyDemoOpenSetterCalls, 0)
|
||||
assertEquals(MyDemoOpenGetterCalls, 0)
|
||||
|
||||
assertEquals(myDemo.demoFun(), 100)
|
||||
assertEquals(myDemo.demoVal, 200)
|
||||
assertEquals(myDemo.demoValGet, 300)
|
||||
assertEquals(myDemo.demoVarSetGet, 400)
|
||||
myDemo.demoVarSetGet = -400
|
||||
assertEquals(myDemo.demoVarSetGet, -400)
|
||||
assertEquals(DemoSetterCalls, 1)
|
||||
assertEquals(DemoGetterCalls, 2)
|
||||
assertEquals(MyDemoSetterCalls, 1)
|
||||
assertEquals(MyDemoGetterCalls, 2)
|
||||
|
||||
assertEquals(myDemo.demoOpenFun(), 500)
|
||||
assertEquals(myDemo.demoOpenVal, 600)
|
||||
assertEquals(myDemo.demoOpenValGet, 700)
|
||||
assertEquals(myDemo.demoOpenVarSetGet, 800)
|
||||
myDemo.demoOpenVarSetGet = -800
|
||||
assertEquals(myDemo.demoOpenVarSetGet, -800)
|
||||
assertEquals(DemoOpenSetterCalls, 1)
|
||||
assertEquals(DemoOpenGetterCalls, 2)
|
||||
assertEquals(MyDemoOpenSetterCalls, 1)
|
||||
assertEquals(MyDemoOpenGetterCalls, 2)
|
||||
}
|
||||
|
||||
fun testLibDemo() {
|
||||
resetCounters()
|
||||
val libDemo = LibDemo()
|
||||
|
||||
assertEquals(testFun(libDemo), 1)
|
||||
assertEquals(testVal(libDemo), 2)
|
||||
assertEquals(testValGet(libDemo), 3)
|
||||
assertEquals(testVarGet(libDemo), 4)
|
||||
testVarSet(libDemo, -4)
|
||||
assertEquals(testVarGet(libDemo), -4)
|
||||
assertEquals(DemoSetterCalls, 1)
|
||||
assertEquals(DemoGetterCalls, 2)
|
||||
|
||||
assertEquals(testOpenFun(libDemo), 50)
|
||||
assertEquals(testOpenVal(libDemo), 60)
|
||||
assertEquals(testOpenValGet(libDemo), 70)
|
||||
assertEquals(testOpenVarGet(libDemo), 80)
|
||||
testOpenVarSet(libDemo, -80)
|
||||
assertEquals(testOpenVarGet(libDemo), -80)
|
||||
assertEquals(LibDemoOpenSetterCalls, 1)
|
||||
assertEquals(LibDemoOpenGetterCalls, 2)
|
||||
assertEquals(DemoOpenSetterCalls, 0)
|
||||
assertEquals(DemoOpenGetterCalls, 0)
|
||||
|
||||
assertEquals(libDemo.demoOpenFun(), 50)
|
||||
assertEquals(libDemo.demoOpenVal, 60)
|
||||
assertEquals(libDemo.demoOpenValGet, 70)
|
||||
assertEquals(libDemo.demoOpenVarSetGet, -80)
|
||||
libDemo.demoOpenVarSetGet = 88
|
||||
assertEquals(libDemo.demoOpenVarSetGet, 88)
|
||||
assertEquals(LibDemoOpenSetterCalls, 2)
|
||||
assertEquals(LibDemoOpenGetterCalls, 4)
|
||||
assertEquals(DemoOpenSetterCalls, 0)
|
||||
assertEquals(DemoOpenGetterCalls, 0)
|
||||
}
|
||||
|
||||
fun testMyDemo2() {
|
||||
resetCounters()
|
||||
val myDemo2 = MyDemo2()
|
||||
|
||||
assertEquals(testFun(myDemo2), 1)
|
||||
assertEquals(testVal(myDemo2), 2)
|
||||
assertEquals(testValGet(myDemo2), 3)
|
||||
assertEquals(testVarGet(myDemo2), 4)
|
||||
testVarSet(myDemo2, -4)
|
||||
assertEquals(testVarGet(myDemo2), -4)
|
||||
assertEquals(DemoSetterCalls, 1)
|
||||
assertEquals(DemoGetterCalls, 2)
|
||||
assertEquals(MyDemo2SetterCalls, 0)
|
||||
assertEquals(MyDemo2GetterCalls, 0)
|
||||
|
||||
assertEquals(testOpenFun(myDemo2), 5000)
|
||||
assertEquals(testOpenVal(myDemo2), 6000)
|
||||
assertEquals(testOpenValGet(myDemo2), 7000)
|
||||
assertEquals(testOpenVarGet(myDemo2), 8000)
|
||||
testOpenVarSet(myDemo2, -8000)
|
||||
assertEquals(testOpenVarGet(myDemo2), -8000)
|
||||
assertEquals(MyDemo2OpenSetterCalls, 1)
|
||||
assertEquals(MyDemo2OpenGetterCalls, 2)
|
||||
assertEquals(LibDemoOpenSetterCalls, 0)
|
||||
assertEquals(LibDemoOpenGetterCalls, 0)
|
||||
assertEquals(DemoOpenSetterCalls, 0)
|
||||
assertEquals(DemoOpenGetterCalls, 0)
|
||||
|
||||
assertEquals(myDemo2.demoFun(), 1000)
|
||||
assertEquals(myDemo2.demoVal, 2000)
|
||||
assertEquals(myDemo2.demoValGet, 3000)
|
||||
assertEquals(myDemo2.demoVarSetGet, 4000)
|
||||
myDemo2.demoVarSetGet = -4000
|
||||
assertEquals(myDemo2.demoVarSetGet, -4000)
|
||||
assertEquals(DemoSetterCalls, 1)
|
||||
assertEquals(DemoGetterCalls, 2)
|
||||
assertEquals(MyDemo2SetterCalls, 1)
|
||||
assertEquals(MyDemo2GetterCalls, 2)
|
||||
|
||||
assertEquals(myDemo2.demoOpenFun(), 5000)
|
||||
assertEquals(myDemo2.demoOpenVal, 6000)
|
||||
assertEquals(myDemo2.demoOpenValGet, 7000)
|
||||
assertEquals(myDemo2.demoOpenVarSetGet, -8000)
|
||||
myDemo2.demoOpenVarSetGet = 8888
|
||||
assertEquals(myDemo2.demoOpenVarSetGet, 8888)
|
||||
assertEquals(MyDemo2OpenSetterCalls, 2)
|
||||
assertEquals(MyDemo2OpenGetterCalls, 4)
|
||||
assertEquals(LibDemoOpenSetterCalls, 0)
|
||||
assertEquals(LibDemoOpenGetterCalls, 0)
|
||||
assertEquals(DemoOpenSetterCalls, 0)
|
||||
assertEquals(DemoOpenGetterCalls, 0)
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
testMyDemo()
|
||||
testLibDemo()
|
||||
testMyDemo2()
|
||||
return "OK"
|
||||
}
|
||||
+70
@@ -0,0 +1,70 @@
|
||||
// IGNORE_BACKEND: WASM
|
||||
// WITH_STDLIB
|
||||
|
||||
// MODULE: lib1
|
||||
|
||||
// FILE: DemoClassInternal1.kt
|
||||
abstract class DemoClassInternal1 {
|
||||
internal open fun demo(): Int = 1
|
||||
}
|
||||
|
||||
interface DemoInterface1 {
|
||||
fun demo(): Int = 2
|
||||
}
|
||||
|
||||
// FILE: TestDemo1.kt
|
||||
fun testDemoClassInternal1(d: DemoClassInternal1): Int = d.demo()
|
||||
fun testDemoInterface1(d: DemoInterface1): Int = d.demo()
|
||||
|
||||
// MODULE: lib2
|
||||
|
||||
// FILE: DemoClassInternal2.kt
|
||||
abstract class DemoClassInternal2 {
|
||||
internal open fun demo(): Int = 3
|
||||
}
|
||||
|
||||
interface DemoInterface2 {
|
||||
fun demo(): Int = 4
|
||||
}
|
||||
|
||||
// FILE: TestDemo.kt
|
||||
fun testDemoClassInternal2(d: DemoClassInternal2): Int = d.demo()
|
||||
fun testDemoInterface2(d: DemoInterface2): Int = d.demo()
|
||||
|
||||
// MODULE: main(lib1)(lib2)
|
||||
|
||||
// FILE: MyDemo.kt
|
||||
class MyDemo1 : DemoClassInternal1(), DemoInterface1, DemoInterface2 {
|
||||
override fun demo(): Int = 10 * super<DemoInterface1>.demo() + super<DemoInterface2>.demo()
|
||||
}
|
||||
|
||||
class MyDemo2 : DemoClassInternal2(), DemoInterface1, DemoInterface2 {
|
||||
override fun demo(): Int = 100 * super<DemoClassInternal2>.demo() + 10 * super<DemoInterface1>.demo() + super<DemoInterface2>.demo()
|
||||
}
|
||||
|
||||
// FILE: Box.kt
|
||||
import kotlin.test.assertEquals
|
||||
|
||||
fun testMyDemo1() {
|
||||
val myDemo = MyDemo1()
|
||||
|
||||
assertEquals(testDemoClassInternal1(myDemo), 1)
|
||||
assertEquals(testDemoInterface1(myDemo), 24)
|
||||
assertEquals(testDemoInterface2(myDemo), 24)
|
||||
assertEquals(myDemo.demo(), 24)
|
||||
}
|
||||
|
||||
fun testMyDemo2() {
|
||||
val myDemo = MyDemo2()
|
||||
|
||||
assertEquals(testDemoClassInternal2(myDemo), 324)
|
||||
assertEquals(testDemoInterface1(myDemo), 324)
|
||||
assertEquals(testDemoInterface2(myDemo), 324)
|
||||
assertEquals(myDemo.demo(), 324)
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
testMyDemo1()
|
||||
testMyDemo2()
|
||||
return "OK"
|
||||
}
|
||||
@@ -0,0 +1,106 @@
|
||||
// WITH_STDLIB
|
||||
|
||||
// MODULE: lib1
|
||||
|
||||
// FILE: DemoClassInternal1.kt
|
||||
abstract class DemoClassInternal {
|
||||
@PublishedApi
|
||||
internal open fun demo(): Int = 1
|
||||
}
|
||||
|
||||
// FILE: TestDemo1.kt
|
||||
inline fun testDemoInline(d: DemoClassInternal): Int = d.demo()
|
||||
fun testDemo(d: DemoClassInternal): Int = d.demo()
|
||||
|
||||
// MODULE: main(lib1)
|
||||
|
||||
// FILE: MyDemo.kt
|
||||
open class MyDemo1 : DemoClassInternal()
|
||||
|
||||
class MyDemo2 : DemoClassInternal() {
|
||||
fun demo(): Int = 2
|
||||
}
|
||||
|
||||
open class MyDemo3 : DemoClassInternal() {
|
||||
open fun demo(): Int = 3
|
||||
}
|
||||
|
||||
class MyDemo4: MyDemo1()
|
||||
|
||||
class MyDemo5: MyDemo1() {
|
||||
fun demo(): Int = 5
|
||||
}
|
||||
|
||||
class MyDemo6: MyDemo3()
|
||||
|
||||
class MyDemo7: MyDemo3() {
|
||||
override fun demo(): Int = 7
|
||||
}
|
||||
|
||||
// FILE: Box.kt
|
||||
import kotlin.test.assertEquals
|
||||
|
||||
fun testMyDemo1() {
|
||||
val myDemo = MyDemo1()
|
||||
|
||||
assertEquals(testDemoInline(myDemo), 1)
|
||||
assertEquals(testDemo(myDemo), 1)
|
||||
}
|
||||
|
||||
fun testMyDemo2() {
|
||||
val myDemo = MyDemo2()
|
||||
|
||||
assertEquals(testDemoInline(myDemo), 2)
|
||||
assertEquals(testDemo(myDemo), 2)
|
||||
assertEquals(myDemo.demo(), 2)
|
||||
}
|
||||
|
||||
fun testMyDemo3() {
|
||||
val myDemo = MyDemo3()
|
||||
|
||||
assertEquals(testDemoInline(myDemo), 3)
|
||||
assertEquals(testDemo(myDemo), 3)
|
||||
assertEquals(myDemo.demo(), 3)
|
||||
}
|
||||
|
||||
fun testMyDemo4() {
|
||||
val myDemo = MyDemo4()
|
||||
|
||||
assertEquals(testDemoInline(myDemo), 1)
|
||||
assertEquals(testDemo(myDemo), 1)
|
||||
}
|
||||
|
||||
fun testMyDemo5() {
|
||||
val myDemo = MyDemo5()
|
||||
|
||||
assertEquals(testDemoInline(myDemo), 5)
|
||||
assertEquals(testDemo(myDemo), 5)
|
||||
assertEquals(myDemo.demo(), 5)
|
||||
}
|
||||
|
||||
fun testMyDemo6() {
|
||||
val myDemo = MyDemo6()
|
||||
|
||||
assertEquals(testDemoInline(myDemo), 3)
|
||||
assertEquals(testDemo(myDemo), 3)
|
||||
assertEquals(myDemo.demo(), 3)
|
||||
}
|
||||
|
||||
fun testMyDemo7() {
|
||||
val myDemo = MyDemo7()
|
||||
|
||||
assertEquals(testDemoInline(myDemo), 7)
|
||||
assertEquals(testDemo(myDemo), 7)
|
||||
assertEquals(myDemo.demo(), 7)
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
testMyDemo1()
|
||||
testMyDemo2()
|
||||
testMyDemo3()
|
||||
testMyDemo4()
|
||||
testMyDemo5()
|
||||
testMyDemo6()
|
||||
testMyDemo7()
|
||||
return "OK"
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
// MODULE: lib1
|
||||
|
||||
// FILE: DemoClassInternal1.kt
|
||||
abstract class DemoClassInternal {
|
||||
@PublishedApi
|
||||
internal open fun demo(): Int = 1
|
||||
}
|
||||
|
||||
// MODULE: main(lib1)
|
||||
|
||||
// FILE: MyDemo.kt
|
||||
open class MyDemo1 : DemoClassInternal()
|
||||
|
||||
class MyDemo2 : MyDemo1()
|
||||
|
||||
class MyDemo3 : DemoClassInternal() {
|
||||
<!CANNOT_OVERRIDE_INVISIBLE_MEMBER!>override<!> fun demo(): Int = 2
|
||||
}
|
||||
|
||||
class MyDemo4 : DemoClassInternal() {
|
||||
fun demo(): Int {
|
||||
return super.<!INVISIBLE_REFERENCE!>demo<!>()
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: Test.kt
|
||||
fun test() {
|
||||
MyDemo1().<!INVISIBLE_REFERENCE!>demo<!>()
|
||||
MyDemo2().<!INVISIBLE_REFERENCE!>demo<!>()
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
// MODULE: lib1
|
||||
|
||||
// FILE: DemoClassInternal1.kt
|
||||
abstract class DemoClassInternal {
|
||||
@PublishedApi
|
||||
internal open fun demo(): Int = 1
|
||||
}
|
||||
|
||||
// MODULE: main(lib1)
|
||||
|
||||
// FILE: MyDemo.kt
|
||||
open class MyDemo1 : DemoClassInternal()
|
||||
|
||||
class MyDemo2 : MyDemo1()
|
||||
|
||||
class MyDemo3 : DemoClassInternal() {
|
||||
<!CANNOT_OVERRIDE_INVISIBLE_MEMBER!>override<!> fun demo(): Int = 2
|
||||
}
|
||||
|
||||
class MyDemo4 : DemoClassInternal() {
|
||||
fun demo(): Int {
|
||||
return super.<!INVISIBLE_MEMBER!>demo<!>()
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: Test.kt
|
||||
fun test() {
|
||||
MyDemo1().<!INVISIBLE_MEMBER!>demo<!>()
|
||||
MyDemo2().<!INVISIBLE_MEMBER!>demo<!>()
|
||||
}
|
||||
@@ -14,17 +14,17 @@ fun box() = abiTest {
|
||||
success("Container.publicToInternalFunction.v2") { c.publicToInternalFunction() } // Signature remains the same.
|
||||
unlinkedSymbol("/ContainerImpl.publicToInternalFunction") { ci.publicToInternalFunction() } // FOs are not generated for internal members from other module.
|
||||
success("Container.publicToInternalPAFunction.v2") { c.publicToInternalPAFunction() } // Signature remains the same.
|
||||
unlinkedSymbol("/ContainerImpl.publicToInternalPAFunction") { ci.publicToInternalPAFunction() } // FOs are not generated for internal members from other module.
|
||||
success("Container.publicToInternalPAFunction.v2") { ci.publicToInternalPAFunction() } // Signature remains the same.
|
||||
inaccessible("publicToPrivateFunction") { c.publicToPrivateFunction() } // Inaccessible from other module though signature remains the same.
|
||||
unlinkedSymbol("/ContainerImpl.publicToPrivateFunction") { ci.publicToPrivateFunction() } // FOs are not generated for private members.
|
||||
|
||||
success("Container.publicToProtectedFunction.v2") { ci.publicToProtectedFunctionAccess() } // Signature remains the same.
|
||||
unlinkedSymbol("/ContainerImpl.publicToInternalFunction") { ci.publicToInternalFunctionAccess() } // FOs are not generated for internal members from other module.
|
||||
unlinkedSymbol("/ContainerImpl.publicToInternalPAFunction") { ci.publicToInternalPAFunctionAccess() } // FOs are not generated for internal members from other module.
|
||||
success("Container.publicToInternalPAFunction.v2") { ci.publicToInternalPAFunctionAccess() } // Signature remains the same.
|
||||
unlinkedSymbol("/ContainerImpl.publicToPrivateFunction") { ci.publicToPrivateFunctionAccess() } // FOs are not generated for private members.
|
||||
success("Container.protectedToPublicFunction.v2") { ci.protectedToPublicFunctionAccess() } // Signature remains the same.
|
||||
unlinkedSymbol("/ContainerImpl.protectedToInternalFunction") { ci.protectedToInternalFunctionAccess() } // FOs are not generated for internal members from other module.
|
||||
unlinkedSymbol("/ContainerImpl.protectedToInternalPAFunction") { ci.protectedToInternalPAFunctionAccess() } // FOs are not generated for internal members from other module.
|
||||
success("Container.protectedToInternalPAFunction.v2") { ci.protectedToInternalPAFunctionAccess() } // Signature remains the same.
|
||||
unlinkedSymbol("/ContainerImpl.protectedToPrivateFunction") { ci.protectedToPrivateFunctionAccess() } // FOs are not generated for private members.
|
||||
|
||||
success("ContainerImpl.publicToProtectedOverriddenFunction") { ci.publicToProtectedOverriddenFunction() }
|
||||
|
||||
@@ -21,9 +21,9 @@ fun box() = abiTest {
|
||||
success("Container.publicToInternalProperty2.v2") { c.publicToInternalProperty2 } // Signature remains the same.
|
||||
unlinkedSymbol("/ContainerImpl.publicToInternalProperty2.<get-publicToInternalProperty2>") { ci.publicToInternalProperty2 } // FOs are not generated for internal members from other module.
|
||||
success("Container.publicToInternalPAProperty1.v2") { c.publicToInternalPAProperty1 } // Signature remains the same.
|
||||
unlinkedSymbol("/ContainerImpl.publicToInternalPAProperty1.<get-publicToInternalPAProperty1>") { ci.publicToInternalPAProperty1 } // FOs are not generated for internal members from other module.
|
||||
success("Container.publicToInternalPAProperty1.v2") { ci.publicToInternalPAProperty1 } // Signature remains the same.
|
||||
success("Container.publicToInternalPAProperty2.v2") { c.publicToInternalPAProperty2 } // Signature remains the same.
|
||||
unlinkedSymbol("/ContainerImpl.publicToInternalPAProperty2.<get-publicToInternalPAProperty2>") { ci.publicToInternalPAProperty2 } // FOs are not generated for internal members from other module.
|
||||
success("Container.publicToInternalPAProperty2.v2") { ci.publicToInternalPAProperty2 } // Signature remains the same.
|
||||
inaccessible("publicToPrivateProperty1.<get-publicToPrivateProperty1>") { c.publicToPrivateProperty1 } // Inaccessible from other module though signature remains the same.
|
||||
unlinkedSymbol("/ContainerImpl.publicToPrivateProperty1.<get-publicToPrivateProperty1>") { ci.publicToPrivateProperty1 } // FOs are not generated for private members.
|
||||
inaccessible("publicToPrivateProperty2.<get-publicToPrivateProperty2>") { c.publicToPrivateProperty2 } // Inaccessible from other module though signature remains the same.
|
||||
@@ -33,16 +33,16 @@ fun box() = abiTest {
|
||||
success("Container.publicToProtectedProperty2.v2") { ci.publicToProtectedProperty2Access() } // Signature remains the same.
|
||||
unlinkedSymbol("/ContainerImpl.publicToInternalProperty1.<get-publicToInternalProperty1>") { ci.publicToInternalProperty1Access() } // FOs are not generated for internal members from other module.
|
||||
unlinkedSymbol("/ContainerImpl.publicToInternalProperty2.<get-publicToInternalProperty2>") { ci.publicToInternalProperty2Access() } // FOs are not generated for internal members from other module.
|
||||
unlinkedSymbol("/ContainerImpl.publicToInternalPAProperty1.<get-publicToInternalPAProperty1>") { ci.publicToInternalPAProperty1Access() } // FOs are not generated for internal members from other module.
|
||||
unlinkedSymbol("/ContainerImpl.publicToInternalPAProperty2.<get-publicToInternalPAProperty2>") { ci.publicToInternalPAProperty2Access() } // FOs are not generated for internal members from other module.
|
||||
success("Container.publicToInternalPAProperty1.v2") { ci.publicToInternalPAProperty1Access() } // Signature remains the same.
|
||||
success("Container.publicToInternalPAProperty2.v2") { ci.publicToInternalPAProperty2Access() } // Signature remains the same.
|
||||
unlinkedSymbol("/ContainerImpl.publicToPrivateProperty1.<get-publicToPrivateProperty1>") { ci.publicToPrivateProperty1Access() } // FOs are not generated for private members.
|
||||
unlinkedSymbol("/ContainerImpl.publicToPrivateProperty2.<get-publicToPrivateProperty2>") { ci.publicToPrivateProperty2Access() } // FOs are not generated for private members.
|
||||
success("Container.protectedToPublicProperty1.v2") { ci.protectedToPublicProperty1Access() } // Signature remains the same.
|
||||
success("Container.protectedToPublicProperty2.v2") { ci.protectedToPublicProperty2Access() } // Signature remains the same.
|
||||
unlinkedSymbol("/ContainerImpl.protectedToInternalProperty1.<get-protectedToInternalProperty1>") { ci.protectedToInternalProperty1Access() } // FOs are not generated for internal members from other module.
|
||||
unlinkedSymbol("/ContainerImpl.protectedToInternalProperty2.<get-protectedToInternalProperty2>") { ci.protectedToInternalProperty2Access() } // FOs are not generated for internal members from other module.
|
||||
unlinkedSymbol("/ContainerImpl.protectedToInternalPAProperty1.<get-protectedToInternalPAProperty1>") { ci.protectedToInternalPAProperty1Access() } // FOs are not generated for internal members from other module.
|
||||
unlinkedSymbol("/ContainerImpl.protectedToInternalPAProperty2.<get-protectedToInternalPAProperty2>") { ci.protectedToInternalPAProperty2Access() } // FOs are not generated for internal members from other module.
|
||||
success("Container.protectedToInternalPAProperty1.v2") { ci.protectedToInternalPAProperty1Access() } // Signature remains the same.
|
||||
success("Container.protectedToInternalPAProperty2.v2") { ci.protectedToInternalPAProperty2Access() } // Signature remains the same.
|
||||
unlinkedSymbol("/ContainerImpl.protectedToPrivateProperty1.<get-protectedToPrivateProperty1>") { ci.protectedToPrivateProperty1Access() } // FOs are not generated for private members.
|
||||
unlinkedSymbol("/ContainerImpl.protectedToPrivateProperty2.<get-protectedToPrivateProperty2>") { ci.protectedToPrivateProperty2Access() } // FOs are not generated for private members.
|
||||
|
||||
|
||||
Generated
+6
@@ -921,6 +921,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
|
||||
runTest("compiler/testData/diagnostics/tests/publishedApi.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("publishedApiOverride.kt")
|
||||
public void testPublishedApiOverride() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/publishedApiOverride.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("QualifiedExpressions.kt")
|
||||
public void testQualifiedExpressions() throws Exception {
|
||||
|
||||
+24
@@ -2213,6 +2213,30 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
runTest("compiler/testData/codegen/box/bridges/innerClassTypeParameters.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("internalMethodOverrideInFriendModule.kt")
|
||||
public void testInternalMethodOverrideInFriendModule() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/bridges/internalMethodOverrideInFriendModule.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("internalMethodOverrideInOtherModule.kt")
|
||||
public void testInternalMethodOverrideInOtherModule() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/bridges/internalMethodOverrideInOtherModule.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("internalMethodOverrideMultipleInheritance.kt")
|
||||
public void testInternalMethodOverrideMultipleInheritance() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/bridges/internalMethodOverrideMultipleInheritance.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("internalMethodOverridePublishedApi.kt")
|
||||
public void testInternalMethodOverridePublishedApi() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/bridges/internalMethodOverridePublishedApi.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt12416.kt")
|
||||
public void testKt12416() throws Exception {
|
||||
|
||||
+24
@@ -2387,6 +2387,30 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
||||
runTest("compiler/testData/codegen/box/bridges/innerClassTypeParameters.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("internalMethodOverrideInFriendModule.kt")
|
||||
public void testInternalMethodOverrideInFriendModule() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/bridges/internalMethodOverrideInFriendModule.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("internalMethodOverrideInOtherModule.kt")
|
||||
public void testInternalMethodOverrideInOtherModule() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/bridges/internalMethodOverrideInOtherModule.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("internalMethodOverrideMultipleInheritance.kt")
|
||||
public void testInternalMethodOverrideMultipleInheritance() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/bridges/internalMethodOverrideMultipleInheritance.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("internalMethodOverridePublishedApi.kt")
|
||||
public void testInternalMethodOverridePublishedApi() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/bridges/internalMethodOverridePublishedApi.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt12416.kt")
|
||||
public void testKt12416() throws Exception {
|
||||
|
||||
+24
@@ -2387,6 +2387,30 @@ public class IrBlackBoxCodegenWithIrInlinerTestGenerated extends AbstractIrBlack
|
||||
runTest("compiler/testData/codegen/box/bridges/innerClassTypeParameters.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("internalMethodOverrideInFriendModule.kt")
|
||||
public void testInternalMethodOverrideInFriendModule() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/bridges/internalMethodOverrideInFriendModule.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("internalMethodOverrideInOtherModule.kt")
|
||||
public void testInternalMethodOverrideInOtherModule() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/bridges/internalMethodOverrideInOtherModule.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("internalMethodOverrideMultipleInheritance.kt")
|
||||
public void testInternalMethodOverrideMultipleInheritance() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/bridges/internalMethodOverrideMultipleInheritance.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("internalMethodOverridePublishedApi.kt")
|
||||
public void testInternalMethodOverridePublishedApi() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/bridges/internalMethodOverridePublishedApi.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt12416.kt")
|
||||
public void testKt12416() throws Exception {
|
||||
|
||||
+20
@@ -2087,6 +2087,26 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
||||
runTest("compiler/testData/codegen/box/bridges/innerClassTypeParameters.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("internalMethodOverrideInFriendModule.kt")
|
||||
public void testInternalMethodOverrideInFriendModule() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/bridges/internalMethodOverrideInFriendModule.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("internalMethodOverrideInOtherModule.kt")
|
||||
public void testInternalMethodOverrideInOtherModule() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/bridges/internalMethodOverrideInOtherModule.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("internalMethodOverrideMultipleInheritance.kt")
|
||||
public void testInternalMethodOverrideMultipleInheritance() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/bridges/internalMethodOverrideMultipleInheritance.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("internalMethodOverridePublishedApi.kt")
|
||||
public void testInternalMethodOverridePublishedApi() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/bridges/internalMethodOverridePublishedApi.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt12416.kt")
|
||||
public void testKt12416() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/bridges/kt12416.kt");
|
||||
|
||||
Generated
+6
@@ -385,6 +385,12 @@ public class JsFirInvalidationPerFileTestGenerated extends AbstractJsFirInvalida
|
||||
runTest("js/js.translator/testData/incremental/invalidation/nonInlineBecomeInline/");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("openClassWithInternalField")
|
||||
public void testOpenClassWithInternalField() throws Exception {
|
||||
runTest("js/js.translator/testData/incremental/invalidation/openClassWithInternalField/");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("privateDeclarationLeakThroughDefaultParam")
|
||||
public void testPrivateDeclarationLeakThroughDefaultParam() throws Exception {
|
||||
|
||||
Generated
+6
@@ -385,6 +385,12 @@ public class JsFirInvalidationPerModuleTestGenerated extends AbstractJsFirInvali
|
||||
runTest("js/js.translator/testData/incremental/invalidation/nonInlineBecomeInline/");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("openClassWithInternalField")
|
||||
public void testOpenClassWithInternalField() throws Exception {
|
||||
runTest("js/js.translator/testData/incremental/invalidation/openClassWithInternalField/");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("privateDeclarationLeakThroughDefaultParam")
|
||||
public void testPrivateDeclarationLeakThroughDefaultParam() throws Exception {
|
||||
|
||||
Generated
+6
@@ -385,6 +385,12 @@ public class JsIrES6InvalidationPerFileTestGenerated extends AbstractJsIrES6Inva
|
||||
runTest("js/js.translator/testData/incremental/invalidation/nonInlineBecomeInline/");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("openClassWithInternalField")
|
||||
public void testOpenClassWithInternalField() throws Exception {
|
||||
runTest("js/js.translator/testData/incremental/invalidation/openClassWithInternalField/");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("privateDeclarationLeakThroughDefaultParam")
|
||||
public void testPrivateDeclarationLeakThroughDefaultParam() throws Exception {
|
||||
|
||||
+6
@@ -385,6 +385,12 @@ public class JsIrES6InvalidationPerModuleTestGenerated extends AbstractJsIrES6In
|
||||
runTest("js/js.translator/testData/incremental/invalidation/nonInlineBecomeInline/");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("openClassWithInternalField")
|
||||
public void testOpenClassWithInternalField() throws Exception {
|
||||
runTest("js/js.translator/testData/incremental/invalidation/openClassWithInternalField/");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("privateDeclarationLeakThroughDefaultParam")
|
||||
public void testPrivateDeclarationLeakThroughDefaultParam() throws Exception {
|
||||
|
||||
Generated
+6
@@ -385,6 +385,12 @@ public class JsIrInvalidationPerFileTestGenerated extends AbstractJsIrInvalidati
|
||||
runTest("js/js.translator/testData/incremental/invalidation/nonInlineBecomeInline/");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("openClassWithInternalField")
|
||||
public void testOpenClassWithInternalField() throws Exception {
|
||||
runTest("js/js.translator/testData/incremental/invalidation/openClassWithInternalField/");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("privateDeclarationLeakThroughDefaultParam")
|
||||
public void testPrivateDeclarationLeakThroughDefaultParam() throws Exception {
|
||||
|
||||
Generated
+6
@@ -385,6 +385,12 @@ public class JsIrInvalidationPerModuleTestGenerated extends AbstractJsIrInvalida
|
||||
runTest("js/js.translator/testData/incremental/invalidation/nonInlineBecomeInline/");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("openClassWithInternalField")
|
||||
public void testOpenClassWithInternalField() throws Exception {
|
||||
runTest("js/js.translator/testData/incremental/invalidation/openClassWithInternalField/");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("privateDeclarationLeakThroughDefaultParam")
|
||||
public void testPrivateDeclarationLeakThroughDefaultParam() throws Exception {
|
||||
|
||||
+24
@@ -1505,6 +1505,30 @@ public class FirJsCodegenBoxTestGenerated extends AbstractFirJsCodegenBoxTest {
|
||||
runTest("compiler/testData/codegen/box/bridges/innerClassTypeParameters.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("internalMethodOverrideInFriendModule.kt")
|
||||
public void testInternalMethodOverrideInFriendModule() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/bridges/internalMethodOverrideInFriendModule.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("internalMethodOverrideInOtherModule.kt")
|
||||
public void testInternalMethodOverrideInOtherModule() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/bridges/internalMethodOverrideInOtherModule.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("internalMethodOverrideMultipleInheritance.kt")
|
||||
public void testInternalMethodOverrideMultipleInheritance() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/bridges/internalMethodOverrideMultipleInheritance.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("internalMethodOverridePublishedApi.kt")
|
||||
public void testInternalMethodOverridePublishedApi() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/bridges/internalMethodOverridePublishedApi.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("jsName.kt")
|
||||
public void testJsName() throws Exception {
|
||||
|
||||
Generated
+24
@@ -1505,6 +1505,30 @@ public class FirJsES6CodegenBoxTestGenerated extends AbstractFirJsES6CodegenBoxT
|
||||
runTest("compiler/testData/codegen/box/bridges/innerClassTypeParameters.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("internalMethodOverrideInFriendModule.kt")
|
||||
public void testInternalMethodOverrideInFriendModule() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/bridges/internalMethodOverrideInFriendModule.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("internalMethodOverrideInOtherModule.kt")
|
||||
public void testInternalMethodOverrideInOtherModule() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/bridges/internalMethodOverrideInOtherModule.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("internalMethodOverrideMultipleInheritance.kt")
|
||||
public void testInternalMethodOverrideMultipleInheritance() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/bridges/internalMethodOverrideMultipleInheritance.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("internalMethodOverridePublishedApi.kt")
|
||||
public void testInternalMethodOverridePublishedApi() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/bridges/internalMethodOverridePublishedApi.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("jsName.kt")
|
||||
public void testJsName() throws Exception {
|
||||
|
||||
+24
@@ -1505,6 +1505,30 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
||||
runTest("compiler/testData/codegen/box/bridges/innerClassTypeParameters.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("internalMethodOverrideInFriendModule.kt")
|
||||
public void testInternalMethodOverrideInFriendModule() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/bridges/internalMethodOverrideInFriendModule.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("internalMethodOverrideInOtherModule.kt")
|
||||
public void testInternalMethodOverrideInOtherModule() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/bridges/internalMethodOverrideInOtherModule.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("internalMethodOverrideMultipleInheritance.kt")
|
||||
public void testInternalMethodOverrideMultipleInheritance() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/bridges/internalMethodOverrideMultipleInheritance.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("internalMethodOverridePublishedApi.kt")
|
||||
public void testInternalMethodOverridePublishedApi() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/bridges/internalMethodOverridePublishedApi.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("jsName.kt")
|
||||
public void testJsName() throws Exception {
|
||||
|
||||
+24
@@ -1505,6 +1505,30 @@ public class IrJsES6CodegenBoxTestGenerated extends AbstractIrJsES6CodegenBoxTes
|
||||
runTest("compiler/testData/codegen/box/bridges/innerClassTypeParameters.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("internalMethodOverrideInFriendModule.kt")
|
||||
public void testInternalMethodOverrideInFriendModule() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/bridges/internalMethodOverrideInFriendModule.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("internalMethodOverrideInOtherModule.kt")
|
||||
public void testInternalMethodOverrideInOtherModule() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/bridges/internalMethodOverrideInOtherModule.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("internalMethodOverrideMultipleInheritance.kt")
|
||||
public void testInternalMethodOverrideMultipleInheritance() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/bridges/internalMethodOverrideMultipleInheritance.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("internalMethodOverridePublishedApi.kt")
|
||||
public void testInternalMethodOverridePublishedApi() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/bridges/internalMethodOverridePublishedApi.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("jsName.kt")
|
||||
public void testJsName() throws Exception {
|
||||
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
abstract class A {
|
||||
internal var prop: Int = 0
|
||||
internal fun func(): Int = 0
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
abstract class A {
|
||||
internal var prop: Int = 1
|
||||
internal fun func(): Int = 1
|
||||
}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
abstract class A {
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
abstract class A {
|
||||
internal var prop: Int = 3
|
||||
internal fun func(): Int = 3
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
fun testProp(a: A): Int {
|
||||
return a.prop
|
||||
}
|
||||
|
||||
fun testFunc(a: A): Int {
|
||||
return a.func()
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
fun testProp(a: A): Int {
|
||||
return 2
|
||||
}
|
||||
|
||||
fun testFunc(a: A): Int {
|
||||
return 2
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
fun testProp(a: A): Int {
|
||||
return a.prop
|
||||
}
|
||||
|
||||
fun testFunc(a: A): Int {
|
||||
return a.func()
|
||||
}
|
||||
Vendored
+19
@@ -0,0 +1,19 @@
|
||||
STEP 0:
|
||||
modifications:
|
||||
U : A.0.kt -> A.kt
|
||||
U : l1.0.kt -> l1.kt
|
||||
added file: A.kt, l1.kt
|
||||
STEP 1:
|
||||
modifications:
|
||||
U : A.1.kt -> A.kt
|
||||
modified ir: A.kt
|
||||
STEP 2:
|
||||
modifications:
|
||||
U : A.2.kt -> A.kt
|
||||
U : l1.2.kt -> l1.kt
|
||||
modified ir: A.kt, l1.kt
|
||||
STEP 3:
|
||||
modifications:
|
||||
U : A.3.kt -> A.kt
|
||||
U : l1.3.kt -> l1.kt
|
||||
modified ir: A.kt, l1.kt
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
class B: A() {
|
||||
val prop: Int
|
||||
get() = 10000
|
||||
|
||||
fun func(): Int = 20000
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
fun box(stepId: Int): String {
|
||||
val prop = testProp(B())
|
||||
if (prop != stepId) {
|
||||
return "Fail prop: $prop != $stepId"
|
||||
}
|
||||
|
||||
val func = testFunc(B())
|
||||
if (func != stepId) {
|
||||
return "Fail func: $func != $stepId"
|
||||
}
|
||||
return "OK"
|
||||
}
|
||||
Vendored
+8
@@ -0,0 +1,8 @@
|
||||
STEP 0:
|
||||
dependencies: lib1
|
||||
modifications:
|
||||
U : B.0.kt -> B.kt
|
||||
U : m.0.kt -> m.kt
|
||||
added file: m.kt, B.kt
|
||||
STEP 1..3:
|
||||
dependencies: lib1
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
MODULES: lib1, main
|
||||
|
||||
STEP 0:
|
||||
libs: lib1, main
|
||||
dirty js modules: lib1, main
|
||||
dirty js files: lib1/l1, lib1/A, main/B, main/m, main/m.export, main
|
||||
STEP 1:
|
||||
libs: lib1, main
|
||||
dirty js modules: lib1
|
||||
dirty js files: lib1/A
|
||||
STEP 2:
|
||||
libs: lib1, main
|
||||
dirty js modules: lib1
|
||||
dirty js files: lib1/l1, lib1/A
|
||||
STEP 3:
|
||||
libs: lib1, main
|
||||
dirty js modules: lib1
|
||||
dirty js files: lib1/l1, lib1/A
|
||||
+24
@@ -1576,6 +1576,30 @@ public class FirNativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTe
|
||||
runTest("compiler/testData/codegen/box/bridges/innerClassTypeParameters.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("internalMethodOverrideInFriendModule.kt")
|
||||
public void testInternalMethodOverrideInFriendModule() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/bridges/internalMethodOverrideInFriendModule.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("internalMethodOverrideInOtherModule.kt")
|
||||
public void testInternalMethodOverrideInOtherModule() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/bridges/internalMethodOverrideInOtherModule.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("internalMethodOverrideMultipleInheritance.kt")
|
||||
public void testInternalMethodOverrideMultipleInheritance() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/bridges/internalMethodOverrideMultipleInheritance.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("internalMethodOverridePublishedApi.kt")
|
||||
public void testInternalMethodOverridePublishedApi() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/bridges/internalMethodOverridePublishedApi.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt12416.kt")
|
||||
public void testKt12416() throws Exception {
|
||||
|
||||
+24
@@ -1618,6 +1618,30 @@ public class FirNativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenB
|
||||
runTest("compiler/testData/codegen/box/bridges/innerClassTypeParameters.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("internalMethodOverrideInFriendModule.kt")
|
||||
public void testInternalMethodOverrideInFriendModule() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/bridges/internalMethodOverrideInFriendModule.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("internalMethodOverrideInOtherModule.kt")
|
||||
public void testInternalMethodOverrideInOtherModule() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/bridges/internalMethodOverrideInOtherModule.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("internalMethodOverrideMultipleInheritance.kt")
|
||||
public void testInternalMethodOverrideMultipleInheritance() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/bridges/internalMethodOverrideMultipleInheritance.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("internalMethodOverridePublishedApi.kt")
|
||||
public void testInternalMethodOverridePublishedApi() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/bridges/internalMethodOverridePublishedApi.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt12416.kt")
|
||||
public void testKt12416() throws Exception {
|
||||
|
||||
+24
@@ -1556,6 +1556,30 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest
|
||||
runTest("compiler/testData/codegen/box/bridges/innerClassTypeParameters.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("internalMethodOverrideInFriendModule.kt")
|
||||
public void testInternalMethodOverrideInFriendModule() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/bridges/internalMethodOverrideInFriendModule.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("internalMethodOverrideInOtherModule.kt")
|
||||
public void testInternalMethodOverrideInOtherModule() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/bridges/internalMethodOverrideInOtherModule.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("internalMethodOverrideMultipleInheritance.kt")
|
||||
public void testInternalMethodOverrideMultipleInheritance() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/bridges/internalMethodOverrideMultipleInheritance.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("internalMethodOverridePublishedApi.kt")
|
||||
public void testInternalMethodOverridePublishedApi() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/bridges/internalMethodOverridePublishedApi.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt12416.kt")
|
||||
public void testKt12416() throws Exception {
|
||||
|
||||
+24
@@ -1577,6 +1577,30 @@ public class NativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenBoxT
|
||||
runTest("compiler/testData/codegen/box/bridges/innerClassTypeParameters.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("internalMethodOverrideInFriendModule.kt")
|
||||
public void testInternalMethodOverrideInFriendModule() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/bridges/internalMethodOverrideInFriendModule.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("internalMethodOverrideInOtherModule.kt")
|
||||
public void testInternalMethodOverrideInOtherModule() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/bridges/internalMethodOverrideInOtherModule.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("internalMethodOverrideMultipleInheritance.kt")
|
||||
public void testInternalMethodOverrideMultipleInheritance() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/bridges/internalMethodOverrideMultipleInheritance.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("internalMethodOverridePublishedApi.kt")
|
||||
public void testInternalMethodOverridePublishedApi() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/bridges/internalMethodOverridePublishedApi.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt12416.kt")
|
||||
public void testKt12416() throws Exception {
|
||||
|
||||
Generated
+24
@@ -1505,6 +1505,30 @@ public class FirWasmCodegenBoxTestGenerated extends AbstractFirWasmCodegenBoxTes
|
||||
runTest("compiler/testData/codegen/box/bridges/innerClassTypeParameters.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("internalMethodOverrideInFriendModule.kt")
|
||||
public void testInternalMethodOverrideInFriendModule() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/bridges/internalMethodOverrideInFriendModule.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("internalMethodOverrideInOtherModule.kt")
|
||||
public void testInternalMethodOverrideInOtherModule() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/bridges/internalMethodOverrideInOtherModule.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("internalMethodOverrideMultipleInheritance.kt")
|
||||
public void testInternalMethodOverrideMultipleInheritance() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/bridges/internalMethodOverrideMultipleInheritance.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("internalMethodOverridePublishedApi.kt")
|
||||
public void testInternalMethodOverridePublishedApi() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/bridges/internalMethodOverridePublishedApi.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt12416.kt")
|
||||
public void testKt12416() throws Exception {
|
||||
|
||||
Generated
+24
@@ -1505,6 +1505,30 @@ public class K1WasmCodegenBoxTestGenerated extends AbstractK1WasmCodegenBoxTest
|
||||
runTest("compiler/testData/codegen/box/bridges/innerClassTypeParameters.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("internalMethodOverrideInFriendModule.kt")
|
||||
public void testInternalMethodOverrideInFriendModule() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/bridges/internalMethodOverrideInFriendModule.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("internalMethodOverrideInOtherModule.kt")
|
||||
public void testInternalMethodOverrideInOtherModule() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/bridges/internalMethodOverrideInOtherModule.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("internalMethodOverrideMultipleInheritance.kt")
|
||||
public void testInternalMethodOverrideMultipleInheritance() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/bridges/internalMethodOverrideMultipleInheritance.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("internalMethodOverridePublishedApi.kt")
|
||||
public void testInternalMethodOverridePublishedApi() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/bridges/internalMethodOverridePublishedApi.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt12416.kt")
|
||||
public void testKt12416() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user