J2K ValueParameterDescriptor inteface in one go

This commit is contained in:
Pavel V. Talanov
2015-10-28 15:32:51 +03:00
parent 4a3632f70e
commit dc1fbe89ec
26 changed files with 56 additions and 68 deletions
@@ -46,14 +46,14 @@ fun copyValueParameters(
ValueParameterDescriptorImpl(
newOwner,
oldParameter,
oldParameter.getIndex(),
oldParameter.index,
oldParameter.getAnnotations(),
oldParameter.getName(),
newType,
oldParameter.declaresDefaultValue(),
oldParameter.isCrossinline,
oldParameter.isNoinline,
if (oldParameter.getVarargElementType() != null) newOwner.module.builtIns.getArrayElementType(newType) else null,
if (oldParameter.varargElementType != null) newOwner.module.builtIns.getArrayElementType(newType) else null,
oldParameter.getSource()
)
}
@@ -37,7 +37,7 @@ public fun <D : CallableMemberDescriptor> D.enhanceSignature(): D {
else null
val enhancedValueParametersTypes = getValueParameters().map {
p -> parts(isCovariant = false) { it.getValueParameters()[p.getIndex()].getType() }.enhance()
p -> parts(isCovariant = false) { it.getValueParameters()[p.index].getType() }.enhance()
}
val enhancedReturnType = parts(isCovariant = true) { it.getReturnType()!! }.enhance()