[BE] Support until operator in back-ends
This commit is contained in:
committed by
teamcity
parent
2378979a99
commit
96d1f89836
@@ -487,6 +487,7 @@ private val nameToOperationConventionOrigin = mutableMapOf(
|
||||
OperatorNameConventions.MOD to IrStatementOrigin.PERC,
|
||||
OperatorNameConventions.REM to IrStatementOrigin.PERC,
|
||||
OperatorNameConventions.RANGE_TO to IrStatementOrigin.RANGE,
|
||||
OperatorNameConventions.RANGE_UNTIL to IrStatementOrigin.RANGE_UNTIL,
|
||||
OperatorNameConventions.CONTAINS to IrStatementOrigin.IN,
|
||||
)
|
||||
|
||||
|
||||
@@ -126,6 +126,7 @@ class IrBuiltInsOverFir(
|
||||
createMemberFunction(OperatorNameConventions.MINUS, intType, "other" to charType, isOperator = true)
|
||||
val charRange = referenceClassByClassId(StandardClassIds.CharRange)!!.owner.defaultType
|
||||
createMemberFunction(OperatorNameConventions.RANGE_TO, charRange, "other" to charType, isIntrinsicConst = false)
|
||||
createMemberFunction(OperatorNameConventions.RANGE_UNTIL, charRange, "other" to charType, isIntrinsicConst = false)
|
||||
createIntrinsicConstOfToStringAndEquals()
|
||||
finalizeClassDefinition()
|
||||
}
|
||||
|
||||
+6
@@ -32671,6 +32671,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
|
||||
runTest("compiler/testData/codegen/box/operatorConventions/remOverModOperation.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("untilOperator.kt")
|
||||
public void testUntilOperator() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/operatorConventions/untilOperator.kt");
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/box/operatorConventions/compareTo")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
|
||||
Reference in New Issue
Block a user