Add ERRORs check to AbstractOutOfBlockModificationTest

This commit is contained in:
Vladimir Dolzhenko
2019-11-23 23:52:04 +01:00
parent 144f721a44
commit c67222c176
43 changed files with 141 additions and 28 deletions
+9 -2
View File
@@ -1,9 +1,16 @@
// OUT_OF_CODE_BLOCK: FALSE
// TYPE: t
fun CharSequence.repeat(n: Int): String {
val sb = StringBuilder(n * length)
for (i in 1..n) {
sb.append(this)
}
return sb.toString()
}
fun twice(s: String): String {
val repeatFun: String.(Int) -> String = { t -> this.repeat(<caret>) }
return repeatFun(s, 2)
}
// TYPE: t