Container of value parameter is always a callable

This commit is contained in:
Alexander Udalov
2015-07-07 16:31:56 +03:00
parent 636b63a8c5
commit 9b832d4b87
9 changed files with 39 additions and 40 deletions
@@ -170,11 +170,12 @@ public class MemberDeserializer(private val c: DeserializationContext) {
}
private fun valueParameters(callable: Callable, kind: AnnotatedCallableKind): List<ValueParameterDescriptor> {
val containerOfCallable = c.containingDeclaration.getContainingDeclaration()!!.asProtoContainer()
val callableDescriptor = c.containingDeclaration as CallableDescriptor
val containerOfCallable = callableDescriptor.getContainingDeclaration().asProtoContainer()
return callable.getValueParameterList().mapIndexed { i, proto ->
ValueParameterDescriptorImpl(
c.containingDeclaration, null, i,
callableDescriptor, null, i,
getParameterAnnotations(containerOfCallable, callable, kind, proto),
c.nameResolver.getName(proto.getName()),
c.typeDeserializer.type(proto.getType()),