Suggest to replace manual range with explicit indices or iterable

#KT-14344 Fixed
This commit is contained in:
KilianCallebaut
2019-03-01 17:23:53 +03:00
committed by Mikhail Glukhikh
parent 8cda5cb849
commit 3451c60f93
17 changed files with 269 additions and 0 deletions
@@ -357,6 +357,10 @@ class KtPsiFactory @JvmOverloads constructor(private val project: Project, val m
return createClass("class A($text)").primaryConstructorParameters.first()
}
fun createLoopParameter(text: String): KtParameter {
return (createExpression("for ($text in list) {}") as KtForExpression).loopParameter!!
}
fun createParameterList(text: String): KtParameterList {
return createFunction("fun foo$text{}").valueParameterList!!
}