Compiler&plugin deprecations cleanup: withIndices -> withIndex or mapIndexed

This commit is contained in:
Ilya Gorbunov
2015-06-25 21:25:59 +03:00
parent f4651f22ca
commit 765733b791
5 changed files with 6 additions and 7 deletions
@@ -352,7 +352,7 @@ fun Class<Any>.findConstructor(methodDesc: MethodDescription): Constructor<Any?>
fun MethodDescription.matches(ctor: Constructor<*>): Boolean {
val methodParams = ctor.getParameterTypes()!!
if (parameterTypes.size() != methodParams.size()) return false
for ((i, p) in parameterTypes.withIndices()) {
for ((i, p) in parameterTypes.withIndex()) {
if (!p.matches(methodParams[i])) return false
}
@@ -364,7 +364,7 @@ fun MethodDescription.matches(method: Method): Boolean {
val methodParams = method.getParameterTypes()!!
if (parameterTypes.size() != methodParams.size()) return false
for ((i, p) in parameterTypes.withIndices()) {
for ((i, p) in parameterTypes.withIndex()) {
if (!p.matches(methodParams[i])) return false
}