Merge pull request #10797 from smowton/smowton/fix/byte-short-inversion

Kotlin: fix bit-inversion operator for Byte and Short types
This commit is contained in:
Chris Smowton
2022-10-17 15:05:57 +01:00
committed by GitHub
6 changed files with 689 additions and 76 deletions

View File

@@ -2449,7 +2449,10 @@ open class KotlinFileExtractor(
}
}
tw.writeExprsKotlinType(id, type.kotlinResult.id)
unaryopDisp(id)
if (isFunction(target, "kotlin", "Byte or Short", { it == "Byte" || it == "Short" }, "inv"))
unaryopReceiver(id, c.extensionReceiver, "Extension receiver")
else
unaryopDisp(id)
}
// We need to handle all the builtin operators defines in BuiltInOperatorNames in
// compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/IrBuiltIns.kt