[FIR] Add INV to UNARY_OPERATION_NAMES, ^KT-50998 Fixed
This commit is contained in:
+6
@@ -5045,6 +5045,12 @@ public class DiagnosisCompilerTestFE10TestdataTestGenerated extends AbstractDiag
|
||||
runTest("compiler/testData/diagnostics/tests/constantEvaluator/constant/integers.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("invAsCompileTimeCall.kt")
|
||||
public void testInvAsCompileTimeCall() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/constantEvaluator/constant/invAsCompileTimeCall.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("localVal.kt")
|
||||
public void testLocalVal() throws Exception {
|
||||
|
||||
+6
@@ -5045,6 +5045,12 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti
|
||||
runTest("compiler/testData/diagnostics/tests/constantEvaluator/constant/integers.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("invAsCompileTimeCall.kt")
|
||||
public void testInvAsCompileTimeCall() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/constantEvaluator/constant/invAsCompileTimeCall.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("localVal.kt")
|
||||
public void testLocalVal() throws Exception {
|
||||
|
||||
+6
@@ -5045,6 +5045,12 @@ public class FirOldFrontendDiagnosticsWithLightTreeTestGenerated extends Abstrac
|
||||
runTest("compiler/testData/diagnostics/tests/constantEvaluator/constant/integers.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("invAsCompileTimeCall.kt")
|
||||
public void testInvAsCompileTimeCall() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/constantEvaluator/constant/invAsCompileTimeCall.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("localVal.kt")
|
||||
public void testLocalVal() throws Exception {
|
||||
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// ISSUE: KT-50998
|
||||
const val Mask: Int = 0xC0000000.toInt()
|
||||
const val Mask_Inv: Int = Mask.inv()
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
package
|
||||
|
||||
public const val Mask: kotlin.Int = -1073741824
|
||||
public const val Mask_Inv: kotlin.Int = 1073741823
|
||||
Generated
+6
@@ -5051,6 +5051,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
|
||||
runTest("compiler/testData/diagnostics/tests/constantEvaluator/constant/integers.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("invAsCompileTimeCall.kt")
|
||||
public void testInvAsCompileTimeCall() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/constantEvaluator/constant/invAsCompileTimeCall.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("localVal.kt")
|
||||
public void testLocalVal() throws Exception {
|
||||
|
||||
@@ -72,10 +72,10 @@ object OperatorNameConventions {
|
||||
// If you add new unary, binary or assignment operators, add it to OperatorConventions as well
|
||||
|
||||
@JvmField
|
||||
val UNARY_OPERATION_NAMES = setOf(INC, DEC, UNARY_PLUS, UNARY_MINUS, NOT)
|
||||
val UNARY_OPERATION_NAMES = setOf(INC, DEC, UNARY_PLUS, UNARY_MINUS, NOT, INV)
|
||||
|
||||
@JvmField
|
||||
val SIMPLE_UNARY_OPERATION_NAMES = setOf(UNARY_PLUS, UNARY_MINUS, NOT)
|
||||
val SIMPLE_UNARY_OPERATION_NAMES = setOf(UNARY_PLUS, UNARY_MINUS, NOT, INV)
|
||||
|
||||
@JvmField
|
||||
val BINARY_OPERATION_NAMES = setOf(TIMES, PLUS, MINUS, DIV, MOD, REM, RANGE_TO)
|
||||
|
||||
Reference in New Issue
Block a user