better checks for mutability, sipport for inplace mutation with assign()

This commit is contained in:
sergeych committed 2025-05-29 01:35:02 +04:00
1 parent ff03f3066d
commit ca93d73b9c
6 files changed
+149 -82

No files matched your search

+1 -1
View File
@@ -38,7 +38,7 @@ data class DocTest(
}
val detailedString by lazy {
val codeWithLines = sourceLines.withIndex().map { (i, s) -> "${i + line}: $s" }.joinToString("\n")
val codeWithLines = sourceLines.withIndex().map { (i, s) -> "${i + line + 1}: $s" }.joinToString("\n")
var result = "$this\n$codeWithLines\n"
if (expectedOutput.isNotBlank())
result += "--------expected output--------\n$expectedOutput\n"