[PowerAssert] Correctly align infix calls with string const receivers

^KT-65640 Fixed
This commit is contained in:
Brian Norman
2024-02-14 07:48:16 -06:00
committed by Space Team
parent 2e4d02e9f4
commit 027474cfb8
3 changed files with 0 additions and 9 deletions
@@ -192,7 +192,6 @@ private fun memberAccessOffset(
?: return 0
val expressionInfo = sourceFile.getSourceRangeInfo(expression)
var offset = receiver.endOffset - expressionInfo.startOffset + 1
if (receiver is IrConst<*> && receiver.kind == IrConstKind.String) offset++ // String constants don't include the quote
if (offset < 0 || offset >= source.length) return 0 // infix function called using non-infix syntax
// Continue until there is a non-whitespace character
@@ -1,7 +1,3 @@
// IGNORE_BACKEND_K1: JVM_IR
// IGNORE_BACKEND_K2: JVM_IR
// Disabled because of KT-65640
fun box() = expectThrowableMessage {
assert("Hello, World".matches("[A-Za-z]+".toRegex()))
}
@@ -1,7 +1,3 @@
// IGNORE_BACKEND_K1: JVM_IR
// IGNORE_BACKEND_K2: JVM_IR
// Disabled because of KT-65640
fun box() = expectThrowableMessage {
assert("Hello, World" matches "[A-Za-z]+".toRegex())
}