[FIR] KT-57655: Add the missing branch
^KT-57655 Fixed
This commit is contained in:
committed by
Space Team
parent
fa0f9a9201
commit
f826011c9f
+6
@@ -33913,6 +33913,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
|
|||||||
runTest("compiler/testData/diagnostics/tests/unsignedTypes/conversions/conversionOfSignedToUnsigned.kt");
|
runTest("compiler/testData/diagnostics/tests/unsignedTypes/conversions/conversionOfSignedToUnsigned.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("implicitIntegerCoercionNamedArg.kt")
|
||||||
|
public void testImplicitIntegerCoercionNamedArg() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/unsignedTypes/conversions/implicitIntegerCoercionNamedArg.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("inferenceForSignedAndUnsignedTypes.kt")
|
@TestMetadata("inferenceForSignedAndUnsignedTypes.kt")
|
||||||
public void testInferenceForSignedAndUnsignedTypes() throws Exception {
|
public void testInferenceForSignedAndUnsignedTypes() throws Exception {
|
||||||
|
|||||||
+6
@@ -33913,6 +33913,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
|
|||||||
runTest("compiler/testData/diagnostics/tests/unsignedTypes/conversions/conversionOfSignedToUnsigned.kt");
|
runTest("compiler/testData/diagnostics/tests/unsignedTypes/conversions/conversionOfSignedToUnsigned.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("implicitIntegerCoercionNamedArg.kt")
|
||||||
|
public void testImplicitIntegerCoercionNamedArg() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/unsignedTypes/conversions/implicitIntegerCoercionNamedArg.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("inferenceForSignedAndUnsignedTypes.kt")
|
@TestMetadata("inferenceForSignedAndUnsignedTypes.kt")
|
||||||
public void testInferenceForSignedAndUnsignedTypes() throws Exception {
|
public void testInferenceForSignedAndUnsignedTypes() throws Exception {
|
||||||
|
|||||||
+6
@@ -33913,6 +33913,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
|
|||||||
runTest("compiler/testData/diagnostics/tests/unsignedTypes/conversions/conversionOfSignedToUnsigned.kt");
|
runTest("compiler/testData/diagnostics/tests/unsignedTypes/conversions/conversionOfSignedToUnsigned.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("implicitIntegerCoercionNamedArg.kt")
|
||||||
|
public void testImplicitIntegerCoercionNamedArg() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/unsignedTypes/conversions/implicitIntegerCoercionNamedArg.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("inferenceForSignedAndUnsignedTypes.kt")
|
@TestMetadata("inferenceForSignedAndUnsignedTypes.kt")
|
||||||
public void testInferenceForSignedAndUnsignedTypes() throws Exception {
|
public void testInferenceForSignedAndUnsignedTypes() throws Exception {
|
||||||
|
|||||||
+6
@@ -34009,6 +34009,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
|
|||||||
runTest("compiler/testData/diagnostics/tests/unsignedTypes/conversions/conversionOfSignedToUnsigned.kt");
|
runTest("compiler/testData/diagnostics/tests/unsignedTypes/conversions/conversionOfSignedToUnsigned.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("implicitIntegerCoercionNamedArg.kt")
|
||||||
|
public void testImplicitIntegerCoercionNamedArg() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/unsignedTypes/conversions/implicitIntegerCoercionNamedArg.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("inferenceForSignedAndUnsignedTypes.kt")
|
@TestMetadata("inferenceForSignedAndUnsignedTypes.kt")
|
||||||
public void testInferenceForSignedAndUnsignedTypes() throws Exception {
|
public void testInferenceForSignedAndUnsignedTypes() throws Exception {
|
||||||
|
|||||||
@@ -593,6 +593,7 @@ fun FirExpression?.isIntegerLiteralOrOperatorCall(): Boolean {
|
|||||||
|| kind == ConstantValueKind.UnsignedIntegerLiteral
|
|| kind == ConstantValueKind.UnsignedIntegerLiteral
|
||||||
|
|
||||||
is FirIntegerLiteralOperatorCall -> true
|
is FirIntegerLiteralOperatorCall -> true
|
||||||
|
is FirNamedArgumentExpression -> this.expression.isIntegerLiteralOrOperatorCall()
|
||||||
else -> false
|
else -> false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Vendored
+21
@@ -0,0 +1,21 @@
|
|||||||
|
// FIR_IDENTICAL
|
||||||
|
// ISSUE: KT-57655
|
||||||
|
// !LANGUAGE: +ImplicitSignedToUnsignedIntegerConversion
|
||||||
|
// ALLOW_KOTLIN_PACKAGE
|
||||||
|
|
||||||
|
// FILE: annotation.kt
|
||||||
|
|
||||||
|
package kotlin.internal
|
||||||
|
|
||||||
|
annotation class ImplicitIntegerCoercion
|
||||||
|
|
||||||
|
// FILE: test.kt
|
||||||
|
|
||||||
|
import kotlin.internal.ImplicitIntegerCoercion
|
||||||
|
|
||||||
|
fun test(@ImplicitIntegerCoercion x: UInt) = x
|
||||||
|
|
||||||
|
fun main() {
|
||||||
|
println(test(x = 5))
|
||||||
|
println(test(5))
|
||||||
|
}
|
||||||
Generated
+6
@@ -34775,6 +34775,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
|
|||||||
runTest("compiler/testData/diagnostics/tests/unsignedTypes/conversions/conversionOfSignedToUnsigned.kt");
|
runTest("compiler/testData/diagnostics/tests/unsignedTypes/conversions/conversionOfSignedToUnsigned.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("implicitIntegerCoercionNamedArg.kt")
|
||||||
|
public void testImplicitIntegerCoercionNamedArg() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/unsignedTypes/conversions/implicitIntegerCoercionNamedArg.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("inferenceForSignedAndUnsignedTypes.kt")
|
@TestMetadata("inferenceForSignedAndUnsignedTypes.kt")
|
||||||
public void testInferenceForSignedAndUnsignedTypes() throws Exception {
|
public void testInferenceForSignedAndUnsignedTypes() throws Exception {
|
||||||
|
|||||||
Reference in New Issue
Block a user