[FIR] KT-57211: Generate FirArrayOfCall for unsigned types
^KT-57211 Fixed Merge-request: KT-MR-9216 Merged-by: Nikolay Lunyak <Nikolay.Lunyak@jetbrains.com>
This commit is contained in:
committed by
Space Team
parent
c17668a225
commit
967ddb8bb0
+6
@@ -35817,6 +35817,12 @@ public class DiagnosisCompilerTestFE10TestdataTestGenerated extends AbstractDiag
|
|||||||
runTest("compiler/testData/diagnostics/testsWithStdLib/commonCollections.kt");
|
runTest("compiler/testData/diagnostics/testsWithStdLib/commonCollections.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("compileTimeUnsignedArray.kt")
|
||||||
|
public void testCompileTimeUnsignedArray() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/testsWithStdLib/compileTimeUnsignedArray.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("elvisOnJavaList.kt")
|
@TestMetadata("elvisOnJavaList.kt")
|
||||||
public void testElvisOnJavaList() throws Exception {
|
public void testElvisOnJavaList() throws Exception {
|
||||||
|
|||||||
+6
@@ -35817,6 +35817,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
|
|||||||
runTest("compiler/testData/diagnostics/testsWithStdLib/commonCollections.kt");
|
runTest("compiler/testData/diagnostics/testsWithStdLib/commonCollections.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("compileTimeUnsignedArray.kt")
|
||||||
|
public void testCompileTimeUnsignedArray() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/testsWithStdLib/compileTimeUnsignedArray.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("elvisOnJavaList.kt")
|
@TestMetadata("elvisOnJavaList.kt")
|
||||||
public void testElvisOnJavaList() throws Exception {
|
public void testElvisOnJavaList() throws Exception {
|
||||||
|
|||||||
+6
@@ -35913,6 +35913,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
|
|||||||
runTest("compiler/testData/diagnostics/testsWithStdLib/commonCollections.kt");
|
runTest("compiler/testData/diagnostics/testsWithStdLib/commonCollections.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("compileTimeUnsignedArray.kt")
|
||||||
|
public void testCompileTimeUnsignedArray() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/testsWithStdLib/compileTimeUnsignedArray.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("elvisOnJavaList.kt")
|
@TestMetadata("elvisOnJavaList.kt")
|
||||||
public void testElvisOnJavaList() throws Exception {
|
public void testElvisOnJavaList() throws Exception {
|
||||||
|
|||||||
@@ -42,8 +42,9 @@ val FirTypeRef.isString: Boolean get() = isBuiltinType(StandardClassIds.String,
|
|||||||
val FirTypeRef.isEnum: Boolean get() = isBuiltinType(StandardClassIds.Enum, false)
|
val FirTypeRef.isEnum: Boolean get() = isBuiltinType(StandardClassIds.Enum, false)
|
||||||
val FirTypeRef.isArrayType: Boolean
|
val FirTypeRef.isArrayType: Boolean
|
||||||
get() =
|
get() =
|
||||||
isBuiltinType(StandardClassIds.Array, false) ||
|
isBuiltinType(StandardClassIds.Array, false)
|
||||||
StandardClassIds.primitiveArrayTypeByElementType.values.any { isBuiltinType(it, false) }
|
|| StandardClassIds.primitiveArrayTypeByElementType.values.any { isBuiltinType(it, false) }
|
||||||
|
|| StandardClassIds.unsignedArrayTypeByElementType.values.any { isBuiltinType(it, false) }
|
||||||
|
|
||||||
val FirExpression.isNullLiteral: Boolean
|
val FirExpression.isNullLiteral: Boolean
|
||||||
get() = this is FirConstExpression<*> &&
|
get() = this is FirConstExpression<*> &&
|
||||||
|
|||||||
@@ -0,0 +1,22 @@
|
|||||||
|
// FIR_IDENTICAL
|
||||||
|
// ISSUE: KT-57211
|
||||||
|
|
||||||
|
@file:OptIn(ExperimentalUnsignedTypes::class)
|
||||||
|
|
||||||
|
annotation class Ann(
|
||||||
|
val u: UInt,
|
||||||
|
val uba: UByteArray,
|
||||||
|
val usa: UShortArray,
|
||||||
|
val uia: UIntArray,
|
||||||
|
val ula: ULongArray,
|
||||||
|
)
|
||||||
|
|
||||||
|
@OptIn(ExperimentalUnsignedTypes::class)
|
||||||
|
@Ann(
|
||||||
|
1u,
|
||||||
|
[1u],
|
||||||
|
ushortArrayOf(),
|
||||||
|
[1u, 1u],
|
||||||
|
ulongArrayOf(1u, 1u),
|
||||||
|
)
|
||||||
|
fun foo() {}
|
||||||
Generated
+6
@@ -35913,6 +35913,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
|
|||||||
runTest("compiler/testData/diagnostics/testsWithStdLib/commonCollections.kt");
|
runTest("compiler/testData/diagnostics/testsWithStdLib/commonCollections.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("compileTimeUnsignedArray.kt")
|
||||||
|
public void testCompileTimeUnsignedArray() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/testsWithStdLib/compileTimeUnsignedArray.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("elvisOnJavaList.kt")
|
@TestMetadata("elvisOnJavaList.kt")
|
||||||
public void testElvisOnJavaList() throws Exception {
|
public void testElvisOnJavaList() throws Exception {
|
||||||
|
|||||||
Reference in New Issue
Block a user