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
@@ -172,7 +172,7 @@ public class MemberDeserializer(private val c: DeserializationContext) {
private fun valueParameters(callable: Callable, kind: AnnotatedCallableKind): List<ValueParameterDescriptor> {
val containerOfCallable = c.containingDeclaration.getContainingDeclaration().asProtoContainer()
return callable.getValueParameterList().withIndices().map { val (i, proto) = it
return callable.getValueParameterList().mapIndexed { i, proto ->
ValueParameterDescriptorImpl(
c.containingDeclaration, null, i,
getParameterAnnotations(containerOfCallable, callable, kind, proto),
@@ -41,7 +41,7 @@ public class TypeDeserializer(
}
else {
val result = LinkedHashMap<Int, TypeParameterDescriptor>()
for ((index, proto) in typeParameterProtos.withIndices()) {
for ((index, proto) in typeParameterProtos.withIndex()) {
result[proto.getId()] = DeserializedTypeParameterDescriptor(c, proto, index)
}
result