Rename Kotlin/Native modules for uniformity
This commit is contained in:
+24
@@ -0,0 +1,24 @@
|
||||
expect class Planet(name: String, diameter: Double) {
|
||||
val name: String
|
||||
val diameter: Double
|
||||
}
|
||||
|
||||
expect val intProperty: Int
|
||||
expect val Int.intProperty: Int
|
||||
expect val Short.intProperty: Int
|
||||
expect val Long.intProperty: Int
|
||||
expect val String.intProperty: Int
|
||||
expect val Planet.intProperty: Int
|
||||
|
||||
expect fun intFunction(): Int
|
||||
expect fun Int.intFunction(): Int
|
||||
expect fun Short.intFunction(): Int
|
||||
expect fun Long.intFunction(): Int
|
||||
expect fun String.intFunction(): Int
|
||||
expect fun Planet.intFunction(): Int
|
||||
|
||||
expect val <T> T.propertyWithTypeParameter1: Int
|
||||
expect val <T : Any?> T.propertyWithTypeParameter2: Int
|
||||
expect val <T : CharSequence> T.propertyWithTypeParameter4: Int
|
||||
|
||||
expect fun <T> T.functionWithTypeParameter1()
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
actual class Planet actual constructor(actual val name: String, actual val diameter: Double)
|
||||
|
||||
actual val intProperty get() = 42
|
||||
actual val Int.intProperty get() = this
|
||||
actual val Short.intProperty get() = toInt()
|
||||
actual val Long.intProperty get() = toInt()
|
||||
actual val String.intProperty get() = length
|
||||
actual val Planet.intProperty get() = diameter.toInt()
|
||||
|
||||
actual fun intFunction() = 42
|
||||
actual fun Int.intFunction() = this
|
||||
actual fun Short.intFunction() = toInt()
|
||||
actual fun Long.intFunction() = toInt()
|
||||
actual fun String.intFunction() = length
|
||||
actual fun Planet.intFunction() = diameter.toInt()
|
||||
|
||||
val String.mismatchedProperty1 get() = 42
|
||||
val mismatchedProperty2 get() = 42
|
||||
|
||||
fun String.mismatchedFunction1() = 42
|
||||
fun mismatchedFunction2() = 42
|
||||
|
||||
actual val <T> T.propertyWithTypeParameter1 get() = 42
|
||||
actual val <T> T.propertyWithTypeParameter2 get() = 42
|
||||
val <T> T.propertyWithTypeParameter3 get() = 42
|
||||
actual val <T : CharSequence> T.propertyWithTypeParameter4 get() = length
|
||||
val <T : CharSequence> T.propertyWithTypeParameter5: Int get() = length
|
||||
val <T : CharSequence> T.propertyWithTypeParameter6: Int get() = length
|
||||
val <T : CharSequence> T.propertyWithTypeParameter7: Int get() = length
|
||||
val <T> T.propertyWithTypeParameter8 get() = 42
|
||||
val <T> T.propertyWithTypeParameter9 get() = 42
|
||||
|
||||
actual fun <T> T.functionWithTypeParameter1() {}
|
||||
fun <T> T.functionWithTypeParameter2() {}
|
||||
fun <T> T.functionWithTypeParameter3() {}
|
||||
fun <T> T.functionWithTypeParameter4() {}
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
actual class Planet actual constructor(actual val name: String, actual val diameter: Double)
|
||||
|
||||
actual val intProperty get() = 42
|
||||
actual val Int.intProperty get() = this
|
||||
actual val Short.intProperty get() = toInt()
|
||||
actual val Long.intProperty get() = toInt()
|
||||
actual val String.intProperty get() = length
|
||||
actual val Planet.intProperty get() = diameter.toInt()
|
||||
|
||||
actual fun intFunction() = 42
|
||||
actual fun Int.intFunction() = this
|
||||
actual fun Short.intFunction() = toInt()
|
||||
actual fun Long.intFunction() = toInt()
|
||||
actual fun String.intFunction() = length
|
||||
actual fun Planet.intFunction() = diameter.toInt()
|
||||
|
||||
val mismatchedProperty1 get() = 42
|
||||
val Double.mismatchedProperty2 get() = 42
|
||||
|
||||
fun mismatchedFunction1() = 42
|
||||
fun Double.mismatchedFunction2() = 42
|
||||
|
||||
actual val <T> T.propertyWithTypeParameter1 get() = 42
|
||||
actual val <T : Any?> T.propertyWithTypeParameter2 get() = 42
|
||||
val <T : Any> T.propertyWithTypeParameter3 get() = 42
|
||||
actual val <T : CharSequence> T.propertyWithTypeParameter4 get() = length
|
||||
val <T : Appendable> T.propertyWithTypeParameter5: Int get() = length
|
||||
val <T : String> T.propertyWithTypeParameter6: Int get() = length
|
||||
val String.propertyWithTypeParameter7: Int get() = length
|
||||
val <Q> Q.propertyWithTypeParameter8 get() = 42
|
||||
val <T, Q> T.propertyWithTypeParameter9 get() = 42
|
||||
|
||||
actual fun <T> T.functionWithTypeParameter1() {}
|
||||
fun <Q> Q.functionWithTypeParameter2() {}
|
||||
fun <T, Q> T.functionWithTypeParameter3() {}
|
||||
fun <T, Q> Q.functionWithTypeParameter4() {}
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
class Planet(val name: String, val diameter: Double)
|
||||
|
||||
val intProperty get() = 42
|
||||
val Int.intProperty get() = this
|
||||
val Short.intProperty get() = toInt()
|
||||
val Long.intProperty get() = toInt()
|
||||
val String.intProperty get() = length
|
||||
val Planet.intProperty get() = diameter.toInt()
|
||||
|
||||
fun intFunction() = 42
|
||||
fun Int.intFunction() = this
|
||||
fun Short.intFunction() = toInt()
|
||||
fun Long.intFunction() = toInt()
|
||||
fun String.intFunction() = length
|
||||
fun Planet.intFunction() = diameter.toInt()
|
||||
|
||||
val String.mismatchedProperty1 get() = 42
|
||||
val mismatchedProperty2 get() = 42
|
||||
|
||||
fun String.mismatchedFunction1() = 42
|
||||
fun mismatchedFunction2() = 42
|
||||
|
||||
val <T> T.propertyWithTypeParameter1 get() = 42
|
||||
val <T> T.propertyWithTypeParameter2 get() = 42
|
||||
val <T> T.propertyWithTypeParameter3 get() = 42
|
||||
val <T : CharSequence> T.propertyWithTypeParameter4: Int get() = length
|
||||
val <T : CharSequence> T.propertyWithTypeParameter5: Int get() = length
|
||||
val <T : CharSequence> T.propertyWithTypeParameter6: Int get() = length
|
||||
val <T : CharSequence> T.propertyWithTypeParameter7: Int get() = length
|
||||
val <T> T.propertyWithTypeParameter8 get() = 42
|
||||
val <T> T.propertyWithTypeParameter9 get() = 42
|
||||
|
||||
fun <T> T.functionWithTypeParameter1() {}
|
||||
fun <T> T.functionWithTypeParameter2() {}
|
||||
fun <T> T.functionWithTypeParameter3() {}
|
||||
fun <T> T.functionWithTypeParameter4() {}
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
class Planet(val name: String, val diameter: Double)
|
||||
|
||||
val intProperty get() = 42
|
||||
val Int.intProperty get() = this
|
||||
val Short.intProperty get() = toInt()
|
||||
val Long.intProperty get() = toInt()
|
||||
val String.intProperty get() = length
|
||||
val Planet.intProperty get() = diameter.toInt()
|
||||
|
||||
fun intFunction() = 42
|
||||
fun Int.intFunction() = this
|
||||
fun Short.intFunction() = toInt()
|
||||
fun Long.intFunction() = toInt()
|
||||
fun String.intFunction() = length
|
||||
fun Planet.intFunction() = diameter.toInt()
|
||||
|
||||
val mismatchedProperty1 get() = 42
|
||||
val Double.mismatchedProperty2 get() = 42
|
||||
|
||||
fun mismatchedFunction1() = 42
|
||||
fun Double.mismatchedFunction2() = 42
|
||||
|
||||
val <T> T.propertyWithTypeParameter1 get() = 42
|
||||
val <T : Any?> T.propertyWithTypeParameter2 get() = 42
|
||||
val <T : Any> T.propertyWithTypeParameter3 get() = 42
|
||||
val <T : CharSequence> T.propertyWithTypeParameter4: Int get() = length
|
||||
val <T : Appendable> T.propertyWithTypeParameter5: Int get() = length
|
||||
val <T : String> T.propertyWithTypeParameter6: Int get() = length
|
||||
val String.propertyWithTypeParameter7: Int get() = length
|
||||
val <Q> Q.propertyWithTypeParameter8 get() = 42
|
||||
val <T, Q> T.propertyWithTypeParameter9 get() = 42
|
||||
|
||||
fun <T> T.functionWithTypeParameter1() {}
|
||||
fun <Q> Q.functionWithTypeParameter2() {}
|
||||
fun <T, Q> T.functionWithTypeParameter3() {}
|
||||
fun <T, Q> Q.functionWithTypeParameter4() {}
|
||||
native/commonizer/testData/callableMemberCommonization/returnTypes/commonized/common/package_root.kt
Vendored
+42
@@ -0,0 +1,42 @@
|
||||
expect class Planet(name: String, diameter: Double) {
|
||||
val name: String
|
||||
val diameter: Double
|
||||
}
|
||||
|
||||
expect val propertyWithInferredType1: Int
|
||||
expect val propertyWithInferredType2: String
|
||||
expect val propertyWithInferredType3: String
|
||||
expect val propertyWithInferredType4: Nothing?
|
||||
expect val propertyWithInferredType5: Planet
|
||||
|
||||
expect class C
|
||||
|
||||
expect val property1: Int
|
||||
expect val property2: String
|
||||
expect val property3: Planet
|
||||
expect val property6: Planet
|
||||
expect val property7: C
|
||||
|
||||
expect fun function1(): Int
|
||||
expect fun function2(): String
|
||||
expect fun function3(): Planet
|
||||
expect fun function6(): Planet
|
||||
expect fun function7(): C
|
||||
|
||||
expect class Box<T>(value: T) {
|
||||
val value: T
|
||||
}
|
||||
expect class Fox()
|
||||
|
||||
expect fun functionWithTypeParametersInReturnType1(): Array<Int>
|
||||
expect fun functionWithTypeParametersInReturnType3(): Array<String>
|
||||
expect fun functionWithTypeParametersInReturnType4(): List<Int>
|
||||
expect fun functionWithTypeParametersInReturnType6(): List<String>
|
||||
expect fun functionWithTypeParametersInReturnType7(): Box<Int>
|
||||
expect fun functionWithTypeParametersInReturnType9(): Box<String>
|
||||
expect fun functionWithTypeParametersInReturnType10(): Box<Planet>
|
||||
expect fun functionWithTypeParametersInReturnType12(): Box<Fox>
|
||||
|
||||
expect fun <T> functionWithUnsubstitutedTypeParametersInReturnType1(): T
|
||||
expect fun <T> functionWithUnsubstitutedTypeParametersInReturnType2(): T
|
||||
expect fun <T> functionWithUnsubstitutedTypeParametersInReturnType8(): Box<T>
|
||||
Vendored
+64
@@ -0,0 +1,64 @@
|
||||
actual class Planet actual constructor(actual val name: String, actual val diameter: Double)
|
||||
|
||||
actual val propertyWithInferredType1 = 1
|
||||
actual val propertyWithInferredType2 = "hello"
|
||||
actual val propertyWithInferredType3 = 42.toString()
|
||||
actual val propertyWithInferredType4 = null
|
||||
actual val propertyWithInferredType5 = Planet("Earth", 12742)
|
||||
|
||||
typealias A = Planet
|
||||
actual typealias C = Planet
|
||||
|
||||
actual val property1 = 1
|
||||
actual val property2 = "hello"
|
||||
actual val property3 = Planet("Earth", 12742)
|
||||
val property4 = A("Earth", 12742)
|
||||
val property5 = A("Earth", 12742)
|
||||
actual val property6 = Planet("Earth", 12742)
|
||||
actual val property7 = C("Earth", 12742)
|
||||
|
||||
actual fun function1() = 1
|
||||
actual fun function2() = "hello"
|
||||
actual fun function3() = Planet("Earth", 12742)
|
||||
fun function4() = A("Earth", 12742)
|
||||
fun function5() = A("Earth", 12742)
|
||||
actual fun function6() = Planet("Earth", 12742)
|
||||
actual fun function7() = C("Earth", 12742)
|
||||
|
||||
val propertyWithMismatchedType1: Int = 1
|
||||
val propertyWithMismatchedType2: Int = 1
|
||||
val propertyWithMismatchedType3: Int = 1
|
||||
val propertyWithMismatchedType4: Int = 1
|
||||
val propertyWithMismatchedType5: Int = 1
|
||||
|
||||
fun functionWithMismatchedType1(): Int = 1
|
||||
fun functionWithMismatchedType2(): Int = 1
|
||||
fun functionWithMismatchedType3(): Int = 1
|
||||
fun functionWithMismatchedType4(): Int = 1
|
||||
fun functionWithMismatchedType5(): Int = 1
|
||||
|
||||
actual class Box<T> actual constructor(actual val value: T)
|
||||
actual class Fox actual constructor()
|
||||
|
||||
actual fun functionWithTypeParametersInReturnType1() = arrayOf(1)
|
||||
fun functionWithTypeParametersInReturnType2() = arrayOf(1)
|
||||
actual fun functionWithTypeParametersInReturnType3() = arrayOf("hello")
|
||||
actual fun functionWithTypeParametersInReturnType4(): List<Int> = listOf(1)
|
||||
fun functionWithTypeParametersInReturnType5(): List<Int> = listOf(1)
|
||||
actual fun functionWithTypeParametersInReturnType6(): List<String> = listOf("hello")
|
||||
actual fun functionWithTypeParametersInReturnType7() = Box(1)
|
||||
fun functionWithTypeParametersInReturnType8() = Box(1)
|
||||
actual fun functionWithTypeParametersInReturnType9() = Box("hello")
|
||||
actual fun functionWithTypeParametersInReturnType10() = Box(Planet("Earth", 12742))
|
||||
fun functionWithTypeParametersInReturnType11() = Box(Planet("Earth", 12742))
|
||||
actual fun functionWithTypeParametersInReturnType12() = Box(Fox())
|
||||
|
||||
actual fun <T> functionWithUnsubstitutedTypeParametersInReturnType1(): T = TODO()
|
||||
actual fun <T> functionWithUnsubstitutedTypeParametersInReturnType2(): T = TODO()
|
||||
fun <T> functionWithUnsubstitutedTypeParametersInReturnType3(): T = TODO()
|
||||
fun <T> functionWithUnsubstitutedTypeParametersInReturnType4(): T = TODO()
|
||||
fun <T> functionWithUnsubstitutedTypeParametersInReturnType5(): T = TODO()
|
||||
fun <T> functionWithUnsubstitutedTypeParametersInReturnType6(): T = TODO()
|
||||
fun <T> functionWithUnsubstitutedTypeParametersInReturnType7(): T = TODO()
|
||||
actual fun <T> functionWithUnsubstitutedTypeParametersInReturnType8(): Box<T> = TODO()
|
||||
fun <T> functionWithUnsubstitutedTypeParametersInReturnType9(): Box<T> = TODO()
|
||||
Vendored
+64
@@ -0,0 +1,64 @@
|
||||
actual class Planet actual constructor(actual val name: String, actual val diameter: Double)
|
||||
|
||||
actual val propertyWithInferredType1 get() = 1
|
||||
actual val propertyWithInferredType2 get() = "hello"
|
||||
actual val propertyWithInferredType3 get() = 42.toString()
|
||||
actual val propertyWithInferredType4 get() = null
|
||||
actual val propertyWithInferredType5 get() = Planet("Earth", 12742)
|
||||
|
||||
typealias B = Planet
|
||||
actual typealias C = Planet
|
||||
|
||||
actual val property1 = 1
|
||||
actual val property2 = "hello"
|
||||
actual val property3 = Planet("Earth", 12742)
|
||||
val property4: B = Planet("Earth", 12742)
|
||||
val property5: Planet = A("Earth", 12742)
|
||||
actual val property6: Planet = A("Earth", 12742)
|
||||
actual val property7: C = Planet("Earth", 12742)
|
||||
|
||||
actual fun function1(): Int = 1
|
||||
actual fun function2(): String = "hello"
|
||||
actual fun function3(): Planet = Planet("Earth", 12742)
|
||||
fun function4(): B = A("Earth", 12742)
|
||||
fun function5(): Planet = A("Earth", 12742)
|
||||
actual fun function6(): Planet = Planet("Earth", 12742)
|
||||
actual fun function7(): C = C("Earth", 12742)
|
||||
|
||||
val propertyWithMismatchedType1: Long = 1
|
||||
val propertyWithMismatchedType2: Short = 1
|
||||
val propertyWithMismatchedType3: Number = 1
|
||||
val propertyWithMismatchedType4: Comparable<Int> = 1
|
||||
val propertyWithMismatchedType5: String = 1.toString()
|
||||
|
||||
fun functionWithMismatchedType1(): Long = 1
|
||||
fun functionWithMismatchedType2(): Short = 1
|
||||
fun functionWithMismatchedType3(): Number = 1
|
||||
fun functionWithMismatchedType4(): Comparable<Int> = 1
|
||||
fun functionWithMismatchedType5(): String = 1.toString()
|
||||
|
||||
actual class Box<T> actual constructor(actual val value: T)
|
||||
actual class Fox actual constructor()
|
||||
|
||||
actual fun functionWithTypeParametersInReturnType1() = arrayOf(1)
|
||||
fun functionWithTypeParametersInReturnType2() = arrayOf("hello")
|
||||
actual fun functionWithTypeParametersInReturnType3() = arrayOf("hello")
|
||||
actual fun functionWithTypeParametersInReturnType4(): List<Int> = listOf(1)
|
||||
fun functionWithTypeParametersInReturnType5(): List<String> = listOf("hello")
|
||||
actual fun functionWithTypeParametersInReturnType6(): List<String> = listOf("hello")
|
||||
actual fun functionWithTypeParametersInReturnType7() = Box(1)
|
||||
fun functionWithTypeParametersInReturnType8() = Box("hello")
|
||||
actual fun functionWithTypeParametersInReturnType9() = Box("hello")
|
||||
actual fun functionWithTypeParametersInReturnType10() = Box(Planet("Earth", 12742))
|
||||
fun functionWithTypeParametersInReturnType11() = Box(Fox())
|
||||
actual fun functionWithTypeParametersInReturnType12() = Box(Fox())
|
||||
|
||||
actual fun <T> functionWithUnsubstitutedTypeParametersInReturnType1(): T = TODO()
|
||||
actual fun <T : Any?> functionWithUnsubstitutedTypeParametersInReturnType2(): T = TODO()
|
||||
fun <T : Any> functionWithUnsubstitutedTypeParametersInReturnType3(): T = TODO()
|
||||
fun <Q> functionWithUnsubstitutedTypeParametersInReturnType4(): Q = TODO()
|
||||
fun <T, Q> functionWithUnsubstitutedTypeParametersInReturnType5(): T = TODO()
|
||||
fun <T, Q> functionWithUnsubstitutedTypeParametersInReturnType6(): Q = TODO()
|
||||
fun functionWithUnsubstitutedTypeParametersInReturnType7(): String = TODO()
|
||||
actual fun <T> functionWithUnsubstitutedTypeParametersInReturnType8(): Box<T> = TODO()
|
||||
fun functionWithUnsubstitutedTypeParametersInReturnType9(): Box<String> = TODO()
|
||||
Vendored
+66
@@ -0,0 +1,66 @@
|
||||
class Planet(val name: String, val diameter: Double)
|
||||
|
||||
val propertyWithInferredType1 = 1
|
||||
val propertyWithInferredType2 = "hello"
|
||||
val propertyWithInferredType3 = 42.toString()
|
||||
val propertyWithInferredType4 = null
|
||||
val propertyWithInferredType5 = Planet("Earth", 12742)
|
||||
|
||||
typealias A = Planet
|
||||
typealias C = Planet
|
||||
|
||||
// with inferred type:
|
||||
val property1 = 1
|
||||
val property2 = "hello"
|
||||
val property3 = Planet("Earth", 12742)
|
||||
val property4 = A("Earth", 12742)
|
||||
val property5 = A("Earth", 12742)
|
||||
val property6 = Planet("Earth", 12742)
|
||||
val property7 = C("Earth", 12742)
|
||||
|
||||
// with inferred type:
|
||||
fun function1() = 1
|
||||
fun function2() = "hello"
|
||||
fun function3() = Planet("Earth", 12742)
|
||||
fun function4() = A("Earth", 12742)
|
||||
fun function5() = A("Earth", 12742)
|
||||
fun function6() = Planet("Earth", 12742)
|
||||
fun function7() = C("Earth", 12742)
|
||||
|
||||
val propertyWithMismatchedType1: Int = 1
|
||||
val propertyWithMismatchedType2: Int = 1
|
||||
val propertyWithMismatchedType3: Int = 1
|
||||
val propertyWithMismatchedType4: Int = 1
|
||||
val propertyWithMismatchedType5: Int = 1
|
||||
|
||||
fun functionWithMismatchedType1(): Int = 1
|
||||
fun functionWithMismatchedType2(): Int = 1
|
||||
fun functionWithMismatchedType3(): Int = 1
|
||||
fun functionWithMismatchedType4(): Int = 1
|
||||
fun functionWithMismatchedType5(): Int = 1
|
||||
|
||||
class Box<T>(val value: T)
|
||||
class Fox
|
||||
|
||||
fun functionWithTypeParametersInReturnType1() = arrayOf(1)
|
||||
fun functionWithTypeParametersInReturnType2() = arrayOf(1)
|
||||
fun functionWithTypeParametersInReturnType3() = arrayOf("hello")
|
||||
fun functionWithTypeParametersInReturnType4(): List<Int> = listOf(1)
|
||||
fun functionWithTypeParametersInReturnType5(): List<Int> = listOf(1)
|
||||
fun functionWithTypeParametersInReturnType6(): List<String> = listOf("hello")
|
||||
fun functionWithTypeParametersInReturnType7() = Box(1)
|
||||
fun functionWithTypeParametersInReturnType8() = Box(1)
|
||||
fun functionWithTypeParametersInReturnType9() = Box("hello")
|
||||
fun functionWithTypeParametersInReturnType10() = Box(Planet("Earth", 12742))
|
||||
fun functionWithTypeParametersInReturnType11() = Box(Planet("Earth", 12742))
|
||||
fun functionWithTypeParametersInReturnType12() = Box(Fox())
|
||||
|
||||
fun <T> functionWithUnsubstitutedTypeParametersInReturnType1(): T = TODO()
|
||||
fun <T> functionWithUnsubstitutedTypeParametersInReturnType2(): T = TODO()
|
||||
fun <T> functionWithUnsubstitutedTypeParametersInReturnType3(): T = TODO()
|
||||
fun <T> functionWithUnsubstitutedTypeParametersInReturnType4(): T = TODO()
|
||||
fun <T> functionWithUnsubstitutedTypeParametersInReturnType5(): T = TODO()
|
||||
fun <T> functionWithUnsubstitutedTypeParametersInReturnType6(): T = TODO()
|
||||
fun <T> functionWithUnsubstitutedTypeParametersInReturnType7(): T = TODO()
|
||||
fun <T> functionWithUnsubstitutedTypeParametersInReturnType8(): Box<T> = TODO()
|
||||
fun <T> functionWithUnsubstitutedTypeParametersInReturnType9(): Box<T> = TODO()
|
||||
Vendored
+66
@@ -0,0 +1,66 @@
|
||||
class Planet(val name: String, val diameter: Double)
|
||||
|
||||
val propertyWithInferredType1 get() = 1
|
||||
val propertyWithInferredType2 get() = "hello"
|
||||
val propertyWithInferredType3 get() = 42.toString()
|
||||
val propertyWithInferredType4 get() = null
|
||||
val propertyWithInferredType5 get() = Planet("Earth", 12742)
|
||||
|
||||
typealias B = Planet
|
||||
typealias C = Planet
|
||||
|
||||
// with explicit type:
|
||||
val property1: Int = 1
|
||||
val property2: String = "hello"
|
||||
val property3: Planet = Planet("Earth", 12742)
|
||||
val property4: B = Planet("Earth", 12742)
|
||||
val property5: Planet = A("Earth", 12742)
|
||||
val property6: Planet = A("Earth", 12742)
|
||||
val property7: C = Planet("Earth", 12742)
|
||||
|
||||
// with explicit type:
|
||||
fun function1(): Int = 1
|
||||
fun function2(): String = "hello"
|
||||
fun function3(): Planet = Planet("Earth", 12742)
|
||||
fun function4(): B = A("Earth", 12742)
|
||||
fun function5(): Planet = A("Earth", 12742)
|
||||
fun function6(): Planet = Planet("Earth", 12742)
|
||||
fun function7(): C = C("Earth", 12742)
|
||||
|
||||
val propertyWithMismatchedType1: Long = 1
|
||||
val propertyWithMismatchedType2: Short = 1
|
||||
val propertyWithMismatchedType3: Number = 1
|
||||
val propertyWithMismatchedType4: Comparable<Int> = 1
|
||||
val propertyWithMismatchedType5: String = 1.toString()
|
||||
|
||||
fun functionWithMismatchedType1(): Long = 1
|
||||
fun functionWithMismatchedType2(): Short = 1
|
||||
fun functionWithMismatchedType3(): Number = 1
|
||||
fun functionWithMismatchedType4(): Comparable<Int> = 1
|
||||
fun functionWithMismatchedType5(): String = 1.toString()
|
||||
|
||||
class Box<T>(val value: T)
|
||||
class Fox
|
||||
|
||||
fun functionWithTypeParametersInReturnType1() = arrayOf(1)
|
||||
fun functionWithTypeParametersInReturnType2() = arrayOf("hello")
|
||||
fun functionWithTypeParametersInReturnType3() = arrayOf("hello")
|
||||
fun functionWithTypeParametersInReturnType4(): List<Int> = listOf(1)
|
||||
fun functionWithTypeParametersInReturnType5(): List<String> = listOf("hello")
|
||||
fun functionWithTypeParametersInReturnType6(): List<String> = listOf("hello")
|
||||
fun functionWithTypeParametersInReturnType7() = Box(1)
|
||||
fun functionWithTypeParametersInReturnType8() = Box("hello")
|
||||
fun functionWithTypeParametersInReturnType9() = Box("hello")
|
||||
fun functionWithTypeParametersInReturnType10() = Box(Planet("Earth", 12742))
|
||||
fun functionWithTypeParametersInReturnType11() = Box(Fox())
|
||||
fun functionWithTypeParametersInReturnType12() = Box(Fox())
|
||||
|
||||
fun <T> functionWithUnsubstitutedTypeParametersInReturnType1(): T = TODO()
|
||||
fun <T : Any?> functionWithUnsubstitutedTypeParametersInReturnType2(): T = TODO()
|
||||
fun <T : Any> functionWithUnsubstitutedTypeParametersInReturnType3(): T = TODO()
|
||||
fun <Q> functionWithUnsubstitutedTypeParametersInReturnType4(): Q = TODO()
|
||||
fun <T, Q> functionWithUnsubstitutedTypeParametersInReturnType5(): T = TODO()
|
||||
fun <T, Q> functionWithUnsubstitutedTypeParametersInReturnType6(): Q = TODO()
|
||||
fun functionWithUnsubstitutedTypeParametersInReturnType7(): String = TODO()
|
||||
fun <T> functionWithUnsubstitutedTypeParametersInReturnType8(): Box<T> = TODO()
|
||||
fun functionWithUnsubstitutedTypeParametersInReturnType9(): Box<String> = TODO()
|
||||
Vendored
+43
@@ -0,0 +1,43 @@
|
||||
expect public val publicProperty: Int
|
||||
expect internal val publicOrInternalProperty: Int
|
||||
expect internal val internalProperty: Int
|
||||
|
||||
expect public fun publicFunction(): Int
|
||||
expect internal fun publicOrInternalFunction(): Int
|
||||
expect internal fun internalFunction(): Int
|
||||
|
||||
expect open class Outer1() {
|
||||
public val publicProperty: Int
|
||||
internal val publicOrInternalProperty: Int
|
||||
internal val internalProperty: Int
|
||||
|
||||
public fun publicFunction(): Int
|
||||
internal fun publicOrInternalFunction(): Int
|
||||
internal fun internalFunction(): Int
|
||||
|
||||
open class Inner1() {
|
||||
public val publicProperty: Int
|
||||
internal val publicOrInternalProperty: Int
|
||||
internal val internalProperty: Int
|
||||
|
||||
public fun publicFunction(): Int
|
||||
internal fun publicOrInternalFunction(): Int
|
||||
internal fun internalFunction(): Int
|
||||
}
|
||||
}
|
||||
|
||||
expect open class Outer2() {
|
||||
public open val publicProperty: Int
|
||||
internal open val internalProperty: Int
|
||||
|
||||
public open fun publicFunction(): Int
|
||||
internal open fun internalFunction(): Int
|
||||
|
||||
open class Inner2() {
|
||||
public open val publicProperty: Int
|
||||
internal open val internalProperty: Int
|
||||
|
||||
public open fun publicFunction(): Int
|
||||
internal open fun internalFunction(): Int
|
||||
}
|
||||
}
|
||||
Vendored
+67
@@ -0,0 +1,67 @@
|
||||
actual public val publicProperty = 1
|
||||
actual public val publicOrInternalProperty = 1
|
||||
actual internal val internalProperty = 1
|
||||
internal val internalOrPrivateProperty = 1
|
||||
private val privateProperty = 1
|
||||
|
||||
actual public fun publicFunction() = 1
|
||||
actual public fun publicOrInternalFunction() = 1
|
||||
actual internal fun internalFunction() = 1
|
||||
internal fun internalOrPrivateFunction() = 1
|
||||
private fun privateFunction() = 1
|
||||
|
||||
actual open class Outer1 actual constructor() {
|
||||
actual public val publicProperty = 1
|
||||
actual public val publicOrInternalProperty = 1
|
||||
actual internal val internalProperty = 1
|
||||
internal val internalOrPrivateProperty = 1
|
||||
private val privateProperty = 1
|
||||
|
||||
actual public fun publicFunction() = 1
|
||||
actual public fun publicOrInternalFunction() = 1
|
||||
actual internal fun internalFunction() = 1
|
||||
internal fun internalOrPrivateFunction() = 1
|
||||
private fun privateFunction() = 1
|
||||
|
||||
actual open class Inner1 actual constructor() {
|
||||
actual public val publicProperty = 1
|
||||
actual public val publicOrInternalProperty = 1
|
||||
actual internal val internalProperty = 1
|
||||
internal val internalOrPrivateProperty = 1
|
||||
private val privateProperty = 1
|
||||
|
||||
actual public fun publicFunction() = 1
|
||||
actual public fun publicOrInternalFunction() = 1
|
||||
actual internal fun internalFunction() = 1
|
||||
internal fun internalOrPrivateFunction() = 1
|
||||
private fun privateFunction() = 1
|
||||
}
|
||||
}
|
||||
|
||||
actual open class Outer2 actual constructor() {
|
||||
actual public open val publicProperty = 1
|
||||
public open val publicOrInternalProperty = 1
|
||||
actual internal open val internalProperty = 1
|
||||
internal open val internalOrPrivateProperty = 1
|
||||
private val privateProperty = 1
|
||||
|
||||
actual public open fun publicFunction() = 1
|
||||
public open fun publicOrInternalFunction() = 1
|
||||
actual internal open fun internalFunction() = 1
|
||||
internal open fun internalOrPrivateFunction() = 1
|
||||
private fun privateFunction() = 1
|
||||
|
||||
actual open class Inner2 actual constructor() {
|
||||
actual public open val publicProperty = 1
|
||||
public open val publicOrInternalProperty = 1
|
||||
actual internal open val internalProperty = 1
|
||||
internal open val internalOrPrivateProperty = 1
|
||||
private val privateProperty = 1
|
||||
|
||||
actual public open fun publicFunction() = 1
|
||||
public open fun publicOrInternalFunction() = 1
|
||||
actual internal open fun internalFunction() = 1
|
||||
internal open fun internalOrPrivateFunction() = 1
|
||||
private fun privateFunction() = 1
|
||||
}
|
||||
}
|
||||
Vendored
+67
@@ -0,0 +1,67 @@
|
||||
actual public val publicProperty = 1
|
||||
actual internal val publicOrInternalProperty = 1
|
||||
actual internal val internalProperty = 1
|
||||
private val internalOrPrivateProperty = 1
|
||||
private val privateProperty = 1
|
||||
|
||||
actual public fun publicFunction() = 1
|
||||
actual internal fun publicOrInternalFunction() = 1
|
||||
actual internal fun internalFunction() = 1
|
||||
private fun internalOrPrivateFunction() = 1
|
||||
private fun privateFunction() = 1
|
||||
|
||||
actual open class Outer1 actual constructor() {
|
||||
actual public val publicProperty = 1
|
||||
actual internal val publicOrInternalProperty = 1
|
||||
actual internal val internalProperty = 1
|
||||
private val internalOrPrivateProperty = 1
|
||||
private val privateProperty = 1
|
||||
|
||||
actual public fun publicFunction() = 1
|
||||
actual internal fun publicOrInternalFunction() = 1
|
||||
actual internal fun internalFunction() = 1
|
||||
private fun internalOrPrivateFunction() = 1
|
||||
private fun privateFunction() = 1
|
||||
|
||||
actual open class Inner1 actual constructor() {
|
||||
actual public val publicProperty = 1
|
||||
actual internal val publicOrInternalProperty = 1
|
||||
actual internal val internalProperty = 1
|
||||
private val internalOrPrivateProperty = 1
|
||||
private val privateProperty = 1
|
||||
|
||||
actual public fun publicFunction() = 1
|
||||
actual internal fun publicOrInternalFunction() = 1
|
||||
actual internal fun internalFunction() = 1
|
||||
private fun internalOrPrivateFunction() = 1
|
||||
private fun privateFunction() = 1
|
||||
}
|
||||
}
|
||||
|
||||
actual open class Outer2 actual constructor() {
|
||||
actual public open val publicProperty = 1
|
||||
internal open val publicOrInternalProperty = 1
|
||||
actual internal open val internalProperty = 1
|
||||
private val internalOrPrivateProperty = 1
|
||||
private val privateProperty = 1
|
||||
|
||||
actual public open fun publicFunction() = 1
|
||||
internal open fun publicOrInternalFunction() = 1
|
||||
actual internal open fun internalFunction() = 1
|
||||
private fun internalOrPrivateFunction() = 1
|
||||
private fun privateFunction() = 1
|
||||
|
||||
actual open class Inner2 actual constructor() {
|
||||
actual public open val publicProperty = 1
|
||||
internal open val publicOrInternalProperty = 1
|
||||
actual internal open val internalProperty = 1
|
||||
private val internalOrPrivateProperty = 1
|
||||
private val privateProperty = 1
|
||||
|
||||
actual public open fun publicFunction() = 1
|
||||
internal open fun publicOrInternalFunction() = 1
|
||||
actual internal open fun internalFunction() = 1
|
||||
private fun internalOrPrivateFunction() = 1
|
||||
private fun privateFunction() = 1
|
||||
}
|
||||
}
|
||||
Vendored
+67
@@ -0,0 +1,67 @@
|
||||
public val publicProperty = 1
|
||||
public val publicOrInternalProperty = 1
|
||||
internal val internalProperty = 1
|
||||
internal val internalOrPrivateProperty = 1
|
||||
private val privateProperty = 1
|
||||
|
||||
public fun publicFunction() = 1
|
||||
public fun publicOrInternalFunction() = 1
|
||||
internal fun internalFunction() = 1
|
||||
internal fun internalOrPrivateFunction() = 1
|
||||
private fun privateFunction() = 1
|
||||
|
||||
open class Outer1 {
|
||||
public val publicProperty = 1
|
||||
public val publicOrInternalProperty = 1
|
||||
internal val internalProperty = 1
|
||||
internal val internalOrPrivateProperty = 1
|
||||
private val privateProperty = 1
|
||||
|
||||
public fun publicFunction() = 1
|
||||
public fun publicOrInternalFunction() = 1
|
||||
internal fun internalFunction() = 1
|
||||
internal fun internalOrPrivateFunction() = 1
|
||||
private fun privateFunction() = 1
|
||||
|
||||
open class Inner1 {
|
||||
public val publicProperty = 1
|
||||
public val publicOrInternalProperty = 1
|
||||
internal val internalProperty = 1
|
||||
internal val internalOrPrivateProperty = 1
|
||||
private val privateProperty = 1
|
||||
|
||||
public fun publicFunction() = 1
|
||||
public fun publicOrInternalFunction() = 1
|
||||
internal fun internalFunction() = 1
|
||||
internal fun internalOrPrivateFunction() = 1
|
||||
private fun privateFunction() = 1
|
||||
}
|
||||
}
|
||||
|
||||
open class Outer2 {
|
||||
public open val publicProperty = 1
|
||||
public open val publicOrInternalProperty = 1
|
||||
internal open val internalProperty = 1
|
||||
internal open val internalOrPrivateProperty = 1
|
||||
private val privateProperty = 1
|
||||
|
||||
public open fun publicFunction() = 1
|
||||
public open fun publicOrInternalFunction() = 1
|
||||
internal open fun internalFunction() = 1
|
||||
internal open fun internalOrPrivateFunction() = 1
|
||||
private fun privateFunction() = 1
|
||||
|
||||
open class Inner2 {
|
||||
public open val publicProperty = 1
|
||||
public open val publicOrInternalProperty = 1
|
||||
internal open val internalProperty = 1
|
||||
internal open val internalOrPrivateProperty = 1
|
||||
private val privateProperty = 1
|
||||
|
||||
public open fun publicFunction() = 1
|
||||
public open fun publicOrInternalFunction() = 1
|
||||
internal open fun internalFunction() = 1
|
||||
internal open fun internalOrPrivateFunction() = 1
|
||||
private fun privateFunction() = 1
|
||||
}
|
||||
}
|
||||
Vendored
+67
@@ -0,0 +1,67 @@
|
||||
public val publicProperty = 1
|
||||
internal val publicOrInternalProperty = 1
|
||||
internal val internalProperty = 1
|
||||
private val internalOrPrivateProperty = 1
|
||||
private val privateProperty = 1
|
||||
|
||||
public fun publicFunction() = 1
|
||||
internal fun publicOrInternalFunction() = 1
|
||||
internal fun internalFunction() = 1
|
||||
private fun internalOrPrivateFunction() = 1
|
||||
private fun privateFunction() = 1
|
||||
|
||||
open class Outer1 {
|
||||
public val publicProperty = 1
|
||||
internal val publicOrInternalProperty = 1
|
||||
internal val internalProperty = 1
|
||||
private val internalOrPrivateProperty = 1
|
||||
private val privateProperty = 1
|
||||
|
||||
public fun publicFunction() = 1
|
||||
internal fun publicOrInternalFunction() = 1
|
||||
internal fun internalFunction() = 1
|
||||
private fun internalOrPrivateFunction() = 1
|
||||
private fun privateFunction() = 1
|
||||
|
||||
open class Inner1 {
|
||||
public val publicProperty = 1
|
||||
internal val publicOrInternalProperty = 1
|
||||
internal val internalProperty = 1
|
||||
private val internalOrPrivateProperty = 1
|
||||
private val privateProperty = 1
|
||||
|
||||
public fun publicFunction() = 1
|
||||
internal fun publicOrInternalFunction() = 1
|
||||
internal fun internalFunction() = 1
|
||||
private fun internalOrPrivateFunction() = 1
|
||||
private fun privateFunction() = 1
|
||||
}
|
||||
}
|
||||
|
||||
open class Outer2 {
|
||||
public open val publicProperty = 1
|
||||
internal open val publicOrInternalProperty = 1
|
||||
internal open val internalProperty = 1
|
||||
private val internalOrPrivateProperty = 1
|
||||
private val privateProperty = 1
|
||||
|
||||
public open fun publicFunction() = 1
|
||||
internal open fun publicOrInternalFunction() = 1
|
||||
internal open fun internalFunction() = 1
|
||||
private fun internalOrPrivateFunction() = 1
|
||||
private fun privateFunction() = 1
|
||||
|
||||
open class Inner2 {
|
||||
public open val publicProperty = 1
|
||||
internal open val publicOrInternalProperty = 1
|
||||
internal open val internalProperty = 1
|
||||
private val internalOrPrivateProperty = 1
|
||||
private val privateProperty = 1
|
||||
|
||||
public open fun publicFunction() = 1
|
||||
internal open fun publicOrInternalFunction() = 1
|
||||
internal open fun internalFunction() = 1
|
||||
private fun internalOrPrivateFunction() = 1
|
||||
private fun privateFunction() = 1
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user