[Commonizer] Use qualified name string for 'UnsafeNumber' annotation
^KT-48459 ^KT-48455
This commit is contained in:
committed by
Space
parent
e7e3cedf69
commit
5a63498963
+1
-1
@@ -5,7 +5,6 @@
|
|||||||
|
|
||||||
package org.jetbrains.kotlin.gradle
|
package org.jetbrains.kotlin.gradle
|
||||||
|
|
||||||
import org.gradle.api.logging.configuration.WarningMode
|
|
||||||
import org.gradle.internal.os.OperatingSystem
|
import org.gradle.internal.os.OperatingSystem
|
||||||
import org.jetbrains.kotlin.konan.file.File
|
import org.jetbrains.kotlin.konan.file.File
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
@@ -23,6 +22,7 @@ class CommonizerHierarchicalIT : BaseGradleIT() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
build(":p1:compileAppleMainKotlinMetadata") {
|
build(":p1:compileAppleMainKotlinMetadata") {
|
||||||
|
|
||||||
assertSuccessful()
|
assertSuccessful()
|
||||||
assertFileExists("p1/build/classes/kotlin/metadata/appleMain/klib/p1_appleMain.klib")
|
assertFileExists("p1/build/classes/kotlin/metadata/appleMain/klib/p1_appleMain.klib")
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -106,6 +106,12 @@ class CirEntityId private constructor(val packageName: CirPackageName, val relat
|
|||||||
relativeNameSegments.joinTo(this, ".")
|
relativeNameSegments.joinTo(this, ".")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun toQualifiedNameString(): String = buildString {
|
||||||
|
packageName.segments.joinTo(this, ".")
|
||||||
|
if (packageName.segments.isNotEmpty()) append(".")
|
||||||
|
relativeNameSegments.joinTo(this, ".")
|
||||||
|
}
|
||||||
|
|
||||||
val isNestedEntity: Boolean get() = relativeNameSegments.size > 1
|
val isNestedEntity: Boolean get() = relativeNameSegments.size > 1
|
||||||
|
|
||||||
fun createNestedEntityId(entityName: CirName): CirEntityId = create(packageName, relativeNameSegments + entityName)
|
fun createNestedEntityId(entityName: CirName): CirEntityId = create(packageName, relativeNameSegments + entityName)
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ private class UnsafeNumberAnnotation(val actualPlatformTypes: Map<String, CirEnt
|
|||||||
|
|
||||||
override val constantValueArguments: Map<CirName, CirConstantValue> = mapOf(
|
override val constantValueArguments: Map<CirName, CirConstantValue> = mapOf(
|
||||||
CirName.create("actualPlatformTypes") to CirConstantValue.ArrayValue(
|
CirName.create("actualPlatformTypes") to CirConstantValue.ArrayValue(
|
||||||
actualPlatformTypes.map { (platform, type) -> CirConstantValue.StringValue("$platform: $type") }
|
actualPlatformTypes.map { (platform, type) -> CirConstantValue.StringValue("$platform: ${type.toQualifiedNameString()}") }
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
+4
-4
@@ -570,9 +570,9 @@ class HierarchicalClassAndTypeAliasCommonizationTest : AbstractInlineSourcesComm
|
|||||||
|
|
||||||
result.assertCommonized(
|
result.assertCommonized(
|
||||||
"(c, d)", """
|
"(c, d)", """
|
||||||
@UnsafeNumber(["c: kotlin/Int", "d: kotlin/Short"])
|
@UnsafeNumber(["c: kotlin.Int", "d: kotlin.Short"])
|
||||||
typealias Proxy = Short
|
typealias Proxy = Short
|
||||||
@UnsafeNumber(["c: kotlin/Int", "d: kotlin/Short"])
|
@UnsafeNumber(["c: kotlin.Int", "d: kotlin.Short"])
|
||||||
typealias X = Proxy
|
typealias X = Proxy
|
||||||
expect val x: X
|
expect val x: X
|
||||||
""".trimIndent()
|
""".trimIndent()
|
||||||
@@ -580,9 +580,9 @@ class HierarchicalClassAndTypeAliasCommonizationTest : AbstractInlineSourcesComm
|
|||||||
|
|
||||||
result.assertCommonized(
|
result.assertCommonized(
|
||||||
"(a, b, c, d)", """
|
"(a, b, c, d)", """
|
||||||
@UnsafeNumber(["a: kotlin/Long", "b: kotlin/Long", "c: kotlin/Int", "d: kotlin/Short"])
|
@UnsafeNumber(["a: kotlin.Long", "b: kotlin.Long", "c: kotlin.Int", "d: kotlin.Short"])
|
||||||
typealias Proxy = Short
|
typealias Proxy = Short
|
||||||
@UnsafeNumber(["a: kotlin/Long", "b: kotlin/Long", "c: kotlin/Int", "d: kotlin/Short"])
|
@UnsafeNumber(["a: kotlin.Long", "b: kotlin.Long", "c: kotlin.Int", "d: kotlin.Short"])
|
||||||
typealias X = Proxy
|
typealias X = Proxy
|
||||||
expect val x: X
|
expect val x: X
|
||||||
""".trimIndent()
|
""".trimIndent()
|
||||||
|
|||||||
+35
-35
@@ -41,7 +41,7 @@ class HierarchicalOptimisticNumbersTypeCommonizerTest : AbstractInlineSourcesCom
|
|||||||
result.assertCommonized(
|
result.assertCommonized(
|
||||||
"(a, b)",
|
"(a, b)",
|
||||||
"""
|
"""
|
||||||
@UnsafeNumber(["a: kotlin/Byte", "b: kotlin/Short"])
|
@UnsafeNumber(["a: kotlin.Byte", "b: kotlin.Short"])
|
||||||
typealias X = Byte
|
typealias X = Byte
|
||||||
""".trimIndent()
|
""".trimIndent()
|
||||||
)
|
)
|
||||||
@@ -58,7 +58,7 @@ class HierarchicalOptimisticNumbersTypeCommonizerTest : AbstractInlineSourcesCom
|
|||||||
result.assertCommonized(
|
result.assertCommonized(
|
||||||
"(a, b)",
|
"(a, b)",
|
||||||
"""
|
"""
|
||||||
@UnsafeNumber(["a: kotlin/Byte", "b: kotlin/Int"])
|
@UnsafeNumber(["a: kotlin.Byte", "b: kotlin.Int"])
|
||||||
typealias X = Byte
|
typealias X = Byte
|
||||||
""".trimIndent()
|
""".trimIndent()
|
||||||
)
|
)
|
||||||
@@ -75,7 +75,7 @@ class HierarchicalOptimisticNumbersTypeCommonizerTest : AbstractInlineSourcesCom
|
|||||||
result.assertCommonized(
|
result.assertCommonized(
|
||||||
"(a, b)",
|
"(a, b)",
|
||||||
"""
|
"""
|
||||||
@UnsafeNumber(["a: kotlin/Byte", "b: kotlin/Long"])
|
@UnsafeNumber(["a: kotlin.Byte", "b: kotlin.Long"])
|
||||||
typealias X = Byte
|
typealias X = Byte
|
||||||
""".trimIndent()
|
""".trimIndent()
|
||||||
)
|
)
|
||||||
@@ -92,7 +92,7 @@ class HierarchicalOptimisticNumbersTypeCommonizerTest : AbstractInlineSourcesCom
|
|||||||
result.assertCommonized(
|
result.assertCommonized(
|
||||||
"(a, b)",
|
"(a, b)",
|
||||||
"""
|
"""
|
||||||
@UnsafeNumber(["a: kotlin/Short", "b: kotlin/Byte"])
|
@UnsafeNumber(["a: kotlin.Short", "b: kotlin.Byte"])
|
||||||
typealias X = Byte
|
typealias X = Byte
|
||||||
""".trimIndent()
|
""".trimIndent()
|
||||||
)
|
)
|
||||||
@@ -125,7 +125,7 @@ class HierarchicalOptimisticNumbersTypeCommonizerTest : AbstractInlineSourcesCom
|
|||||||
result.assertCommonized(
|
result.assertCommonized(
|
||||||
"(a, b)",
|
"(a, b)",
|
||||||
"""
|
"""
|
||||||
@UnsafeNumber(["a: kotlin/Short", "b: kotlin/Int"])
|
@UnsafeNumber(["a: kotlin.Short", "b: kotlin.Int"])
|
||||||
typealias X = Short
|
typealias X = Short
|
||||||
""".trimIndent()
|
""".trimIndent()
|
||||||
)
|
)
|
||||||
@@ -142,7 +142,7 @@ class HierarchicalOptimisticNumbersTypeCommonizerTest : AbstractInlineSourcesCom
|
|||||||
result.assertCommonized(
|
result.assertCommonized(
|
||||||
"(a, b)",
|
"(a, b)",
|
||||||
"""
|
"""
|
||||||
@UnsafeNumber(["a: kotlin/Short", "b: kotlin/Long"])
|
@UnsafeNumber(["a: kotlin.Short", "b: kotlin.Long"])
|
||||||
typealias X = Short
|
typealias X = Short
|
||||||
""".trimIndent()
|
""".trimIndent()
|
||||||
)
|
)
|
||||||
@@ -159,7 +159,7 @@ class HierarchicalOptimisticNumbersTypeCommonizerTest : AbstractInlineSourcesCom
|
|||||||
result.assertCommonized(
|
result.assertCommonized(
|
||||||
"(a, b)",
|
"(a, b)",
|
||||||
"""
|
"""
|
||||||
@UnsafeNumber(["a: kotlin/Int", "b: kotlin/Byte"])
|
@UnsafeNumber(["a: kotlin.Int", "b: kotlin.Byte"])
|
||||||
typealias X = Byte
|
typealias X = Byte
|
||||||
""".trimIndent()
|
""".trimIndent()
|
||||||
)
|
)
|
||||||
@@ -176,7 +176,7 @@ class HierarchicalOptimisticNumbersTypeCommonizerTest : AbstractInlineSourcesCom
|
|||||||
result.assertCommonized(
|
result.assertCommonized(
|
||||||
"(a, b)",
|
"(a, b)",
|
||||||
"""
|
"""
|
||||||
@UnsafeNumber(["a: kotlin/Int", "b: kotlin/Short"])
|
@UnsafeNumber(["a: kotlin.Int", "b: kotlin.Short"])
|
||||||
typealias X = Short
|
typealias X = Short
|
||||||
""".trimIndent()
|
""".trimIndent()
|
||||||
)
|
)
|
||||||
@@ -209,7 +209,7 @@ class HierarchicalOptimisticNumbersTypeCommonizerTest : AbstractInlineSourcesCom
|
|||||||
result.assertCommonized(
|
result.assertCommonized(
|
||||||
"(a, b)",
|
"(a, b)",
|
||||||
"""
|
"""
|
||||||
@UnsafeNumber(["a: kotlin/Int", "b: kotlin/Long"])
|
@UnsafeNumber(["a: kotlin.Int", "b: kotlin.Long"])
|
||||||
typealias X = Int
|
typealias X = Int
|
||||||
""".trimIndent()
|
""".trimIndent()
|
||||||
)
|
)
|
||||||
@@ -226,7 +226,7 @@ class HierarchicalOptimisticNumbersTypeCommonizerTest : AbstractInlineSourcesCom
|
|||||||
result.assertCommonized(
|
result.assertCommonized(
|
||||||
"(a, b)",
|
"(a, b)",
|
||||||
"""
|
"""
|
||||||
@UnsafeNumber(["a: kotlin/Long", "b: kotlin/Byte"])
|
@UnsafeNumber(["a: kotlin.Long", "b: kotlin.Byte"])
|
||||||
typealias X = Byte
|
typealias X = Byte
|
||||||
""".trimIndent()
|
""".trimIndent()
|
||||||
)
|
)
|
||||||
@@ -243,7 +243,7 @@ class HierarchicalOptimisticNumbersTypeCommonizerTest : AbstractInlineSourcesCom
|
|||||||
result.assertCommonized(
|
result.assertCommonized(
|
||||||
"(a, b)",
|
"(a, b)",
|
||||||
"""
|
"""
|
||||||
@UnsafeNumber(["a: kotlin/Long", "b: kotlin/Short"])
|
@UnsafeNumber(["a: kotlin.Long", "b: kotlin.Short"])
|
||||||
typealias X = Short
|
typealias X = Short
|
||||||
""".trimIndent()
|
""".trimIndent()
|
||||||
)
|
)
|
||||||
@@ -260,7 +260,7 @@ class HierarchicalOptimisticNumbersTypeCommonizerTest : AbstractInlineSourcesCom
|
|||||||
result.assertCommonized(
|
result.assertCommonized(
|
||||||
"(a, b)",
|
"(a, b)",
|
||||||
"""
|
"""
|
||||||
@UnsafeNumber(["a: kotlin/Long", "b: kotlin/Int"])
|
@UnsafeNumber(["a: kotlin.Long", "b: kotlin.Int"])
|
||||||
typealias X = Int
|
typealias X = Int
|
||||||
""".trimIndent()
|
""".trimIndent()
|
||||||
)
|
)
|
||||||
@@ -309,7 +309,7 @@ class HierarchicalOptimisticNumbersTypeCommonizerTest : AbstractInlineSourcesCom
|
|||||||
result.assertCommonized(
|
result.assertCommonized(
|
||||||
"(a, b)",
|
"(a, b)",
|
||||||
"""
|
"""
|
||||||
@UnsafeNumber(["a: kotlin/UByte", "b: kotlin/UShort"])
|
@UnsafeNumber(["a: kotlin.UByte", "b: kotlin.UShort"])
|
||||||
typealias X = UByte
|
typealias X = UByte
|
||||||
""".trimIndent()
|
""".trimIndent()
|
||||||
)
|
)
|
||||||
@@ -326,7 +326,7 @@ class HierarchicalOptimisticNumbersTypeCommonizerTest : AbstractInlineSourcesCom
|
|||||||
result.assertCommonized(
|
result.assertCommonized(
|
||||||
"(a, b)",
|
"(a, b)",
|
||||||
"""
|
"""
|
||||||
@UnsafeNumber(["a: kotlin/UByte", "b: kotlin/UInt"])
|
@UnsafeNumber(["a: kotlin.UByte", "b: kotlin.UInt"])
|
||||||
typealias X = UByte
|
typealias X = UByte
|
||||||
""".trimIndent()
|
""".trimIndent()
|
||||||
)
|
)
|
||||||
@@ -343,7 +343,7 @@ class HierarchicalOptimisticNumbersTypeCommonizerTest : AbstractInlineSourcesCom
|
|||||||
result.assertCommonized(
|
result.assertCommonized(
|
||||||
"(a, b)",
|
"(a, b)",
|
||||||
"""
|
"""
|
||||||
@UnsafeNumber(["a: kotlin/UByte", "b: kotlin/ULong"])
|
@UnsafeNumber(["a: kotlin.UByte", "b: kotlin.ULong"])
|
||||||
typealias X = UByte
|
typealias X = UByte
|
||||||
""".trimIndent()
|
""".trimIndent()
|
||||||
)
|
)
|
||||||
@@ -360,7 +360,7 @@ class HierarchicalOptimisticNumbersTypeCommonizerTest : AbstractInlineSourcesCom
|
|||||||
result.assertCommonized(
|
result.assertCommonized(
|
||||||
"(a, b)",
|
"(a, b)",
|
||||||
"""
|
"""
|
||||||
@UnsafeNumber(["a: kotlin/UShort", "b: kotlin/UByte"])
|
@UnsafeNumber(["a: kotlin.UShort", "b: kotlin.UByte"])
|
||||||
typealias X = UByte
|
typealias X = UByte
|
||||||
""".trimIndent()
|
""".trimIndent()
|
||||||
)
|
)
|
||||||
@@ -393,7 +393,7 @@ class HierarchicalOptimisticNumbersTypeCommonizerTest : AbstractInlineSourcesCom
|
|||||||
result.assertCommonized(
|
result.assertCommonized(
|
||||||
"(a, b)",
|
"(a, b)",
|
||||||
"""
|
"""
|
||||||
@UnsafeNumber(["a: kotlin/UShort", "b: kotlin/UInt"])
|
@UnsafeNumber(["a: kotlin.UShort", "b: kotlin.UInt"])
|
||||||
typealias X = UShort
|
typealias X = UShort
|
||||||
""".trimIndent()
|
""".trimIndent()
|
||||||
)
|
)
|
||||||
@@ -410,7 +410,7 @@ class HierarchicalOptimisticNumbersTypeCommonizerTest : AbstractInlineSourcesCom
|
|||||||
result.assertCommonized(
|
result.assertCommonized(
|
||||||
"(a, b)",
|
"(a, b)",
|
||||||
"""
|
"""
|
||||||
@UnsafeNumber(["a: kotlin/UShort", "b: kotlin/ULong"])
|
@UnsafeNumber(["a: kotlin.UShort", "b: kotlin.ULong"])
|
||||||
typealias X = UShort
|
typealias X = UShort
|
||||||
""".trimIndent()
|
""".trimIndent()
|
||||||
)
|
)
|
||||||
@@ -427,7 +427,7 @@ class HierarchicalOptimisticNumbersTypeCommonizerTest : AbstractInlineSourcesCom
|
|||||||
result.assertCommonized(
|
result.assertCommonized(
|
||||||
"(a, b)",
|
"(a, b)",
|
||||||
"""
|
"""
|
||||||
@UnsafeNumber(["a: kotlin/UInt", "b: kotlin/UByte"])
|
@UnsafeNumber(["a: kotlin.UInt", "b: kotlin.UByte"])
|
||||||
typealias X = UByte
|
typealias X = UByte
|
||||||
""".trimIndent()
|
""".trimIndent()
|
||||||
)
|
)
|
||||||
@@ -444,7 +444,7 @@ class HierarchicalOptimisticNumbersTypeCommonizerTest : AbstractInlineSourcesCom
|
|||||||
result.assertCommonized(
|
result.assertCommonized(
|
||||||
"(a, b)",
|
"(a, b)",
|
||||||
"""
|
"""
|
||||||
@UnsafeNumber(["a: kotlin/UInt", "b: kotlin/UShort"])
|
@UnsafeNumber(["a: kotlin.UInt", "b: kotlin.UShort"])
|
||||||
typealias X = UShort
|
typealias X = UShort
|
||||||
""".trimIndent()
|
""".trimIndent()
|
||||||
)
|
)
|
||||||
@@ -477,7 +477,7 @@ class HierarchicalOptimisticNumbersTypeCommonizerTest : AbstractInlineSourcesCom
|
|||||||
result.assertCommonized(
|
result.assertCommonized(
|
||||||
"(a, b)",
|
"(a, b)",
|
||||||
"""
|
"""
|
||||||
@UnsafeNumber(["a: kotlin/UInt", "b: kotlin/ULong"])
|
@UnsafeNumber(["a: kotlin.UInt", "b: kotlin.ULong"])
|
||||||
typealias X = UInt
|
typealias X = UInt
|
||||||
""".trimIndent()
|
""".trimIndent()
|
||||||
)
|
)
|
||||||
@@ -494,7 +494,7 @@ class HierarchicalOptimisticNumbersTypeCommonizerTest : AbstractInlineSourcesCom
|
|||||||
result.assertCommonized(
|
result.assertCommonized(
|
||||||
"(a, b)",
|
"(a, b)",
|
||||||
"""
|
"""
|
||||||
@UnsafeNumber(["a: kotlin/ULong", "b: kotlin/UByte"])
|
@UnsafeNumber(["a: kotlin.ULong", "b: kotlin.UByte"])
|
||||||
typealias X = UByte
|
typealias X = UByte
|
||||||
""".trimIndent()
|
""".trimIndent()
|
||||||
)
|
)
|
||||||
@@ -511,7 +511,7 @@ class HierarchicalOptimisticNumbersTypeCommonizerTest : AbstractInlineSourcesCom
|
|||||||
result.assertCommonized(
|
result.assertCommonized(
|
||||||
"(a, b)",
|
"(a, b)",
|
||||||
"""
|
"""
|
||||||
@UnsafeNumber(["a: kotlin/ULong", "b: kotlin/UShort"])
|
@UnsafeNumber(["a: kotlin.ULong", "b: kotlin.UShort"])
|
||||||
typealias X = UShort
|
typealias X = UShort
|
||||||
""".trimIndent()
|
""".trimIndent()
|
||||||
)
|
)
|
||||||
@@ -528,7 +528,7 @@ class HierarchicalOptimisticNumbersTypeCommonizerTest : AbstractInlineSourcesCom
|
|||||||
result.assertCommonized(
|
result.assertCommonized(
|
||||||
"(a, b)",
|
"(a, b)",
|
||||||
"""
|
"""
|
||||||
@UnsafeNumber(["a: kotlin/ULong", "b: kotlin/UInt"])
|
@UnsafeNumber(["a: kotlin.ULong", "b: kotlin.UInt"])
|
||||||
typealias X = UInt
|
typealias X = UInt
|
||||||
""".trimIndent()
|
""".trimIndent()
|
||||||
)
|
)
|
||||||
@@ -566,7 +566,7 @@ class HierarchicalOptimisticNumbersTypeCommonizerTest : AbstractInlineSourcesCom
|
|||||||
|
|
||||||
result.assertCommonized(
|
result.assertCommonized(
|
||||||
"(a, b)", """
|
"(a, b)", """
|
||||||
@UnsafeNumber(["a: kotlinx/cinterop/UIntVarOf", "b: kotlinx/cinterop/ULongVarOf"])
|
@UnsafeNumber(["a: kotlinx.cinterop.UIntVarOf", "b: kotlinx.cinterop.ULongVarOf"])
|
||||||
typealias X = kotlinx.cinterop.UIntVarOf
|
typealias X = kotlinx.cinterop.UIntVarOf
|
||||||
""".trimIndent()
|
""".trimIndent()
|
||||||
)
|
)
|
||||||
@@ -582,7 +582,7 @@ class HierarchicalOptimisticNumbersTypeCommonizerTest : AbstractInlineSourcesCom
|
|||||||
|
|
||||||
result.assertCommonized(
|
result.assertCommonized(
|
||||||
"(a, b)", """
|
"(a, b)", """
|
||||||
@UnsafeNumber(["a: kotlinx/cinterop/IntVarOf", "b: kotlinx/cinterop/LongVarOf"])
|
@UnsafeNumber(["a: kotlinx.cinterop.IntVarOf", "b: kotlinx.cinterop.LongVarOf"])
|
||||||
typealias X = kotlinx.cinterop.IntVarOf
|
typealias X = kotlinx.cinterop.IntVarOf
|
||||||
""".trimIndent()
|
""".trimIndent()
|
||||||
)
|
)
|
||||||
@@ -613,11 +613,11 @@ class HierarchicalOptimisticNumbersTypeCommonizerTest : AbstractInlineSourcesCom
|
|||||||
|
|
||||||
result.assertCommonized(
|
result.assertCommonized(
|
||||||
"(a, b)", """
|
"(a, b)", """
|
||||||
@UnsafeNumber(["a: kotlin/Int", "b: kotlin/Long"])
|
@UnsafeNumber(["a: kotlin.Int", "b: kotlin.Long"])
|
||||||
typealias A = Int
|
typealias A = Int
|
||||||
@UnsafeNumber(["a: kotlin/Int", "b: kotlin/Long"])
|
@UnsafeNumber(["a: kotlin.Int", "b: kotlin.Long"])
|
||||||
typealias B = A
|
typealias B = A
|
||||||
@UnsafeNumber(["a: kotlin/Int", "b: kotlin/Long"])
|
@UnsafeNumber(["a: kotlin.Int", "b: kotlin.Long"])
|
||||||
typealias X = Int
|
typealias X = Int
|
||||||
""".trimIndent()
|
""".trimIndent()
|
||||||
)
|
)
|
||||||
@@ -663,7 +663,7 @@ class HierarchicalOptimisticNumbersTypeCommonizerTest : AbstractInlineSourcesCom
|
|||||||
|
|
||||||
result.assertCommonized(
|
result.assertCommonized(
|
||||||
"(a, b)", """
|
"(a, b)", """
|
||||||
@UnsafeNumber(["a: kotlin/Int", "b: kotlin/Long"])
|
@UnsafeNumber(["a: kotlin.Int", "b: kotlin.Long"])
|
||||||
typealias X = Int
|
typealias X = Int
|
||||||
expect fun x(p: X)
|
expect fun x(p: X)
|
||||||
""".trimIndent()
|
""".trimIndent()
|
||||||
@@ -706,7 +706,7 @@ class HierarchicalOptimisticNumbersTypeCommonizerTest : AbstractInlineSourcesCom
|
|||||||
|
|
||||||
result.assertCommonized(
|
result.assertCommonized(
|
||||||
"(a, b)", """
|
"(a, b)", """
|
||||||
@UnsafeNumber(["a: kotlin/UShort", "b: kotlin/ULong"])
|
@UnsafeNumber(["a: kotlin.UShort", "b: kotlin.ULong"])
|
||||||
typealias X = UShort
|
typealias X = UShort
|
||||||
expect val x: X
|
expect val x: X
|
||||||
""".trimIndent()
|
""".trimIndent()
|
||||||
@@ -727,7 +727,7 @@ class HierarchicalOptimisticNumbersTypeCommonizerTest : AbstractInlineSourcesCom
|
|||||||
|
|
||||||
result.assertCommonized(
|
result.assertCommonized(
|
||||||
"(a, b)", """
|
"(a, b)", """
|
||||||
@UnsafeNumber(["a: kotlin/Short", "b: kotlin/Int"])
|
@UnsafeNumber(["a: kotlin.Short", "b: kotlin.Int"])
|
||||||
typealias X = Short
|
typealias X = Short
|
||||||
""".trimIndent()
|
""".trimIndent()
|
||||||
)
|
)
|
||||||
@@ -740,21 +740,21 @@ class HierarchicalOptimisticNumbersTypeCommonizerTest : AbstractInlineSourcesCom
|
|||||||
|
|
||||||
result.assertCommonized(
|
result.assertCommonized(
|
||||||
"(e, f)", """
|
"(e, f)", """
|
||||||
@UnsafeNumber(["e: kotlin/Long", "f: kotlin/Int"])
|
@UnsafeNumber(["e: kotlin.Long", "f: kotlin.Int"])
|
||||||
typealias X = Int
|
typealias X = Int
|
||||||
""".trimIndent()
|
""".trimIndent()
|
||||||
)
|
)
|
||||||
|
|
||||||
result.assertCommonized(
|
result.assertCommonized(
|
||||||
"(c, d, e, f)", """
|
"(c, d, e, f)", """
|
||||||
@UnsafeNumber(["c: kotlin/Int", "d: kotlin/Int", "e: kotlin/Long", "f: kotlin/Int"])
|
@UnsafeNumber(["c: kotlin.Int", "d: kotlin.Int", "e: kotlin.Long", "f: kotlin.Int"])
|
||||||
typealias X = Int
|
typealias X = Int
|
||||||
""".trimIndent()
|
""".trimIndent()
|
||||||
)
|
)
|
||||||
|
|
||||||
result.assertCommonized(
|
result.assertCommonized(
|
||||||
"(a, b, c, d, e, f)", """
|
"(a, b, c, d, e, f)", """
|
||||||
@UnsafeNumber(["a: kotlin/Short", "b: kotlin/Int" ,"c: kotlin/Int", "d: kotlin/Int","e: kotlin/Long", "f: kotlin/Int"])
|
@UnsafeNumber(["a: kotlin.Short", "b: kotlin.Int" ,"c: kotlin.Int", "d: kotlin.Int","e: kotlin.Long", "f: kotlin.Int"])
|
||||||
typealias X = Short
|
typealias X = Short
|
||||||
""".trimIndent()
|
""".trimIndent()
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user