Initial implementation of KT-4046 Support 'Create constructor matching superclass'

#KT-4046 Fixed
This commit is contained in:
Valentin Kipyatkov
2015-05-08 19:49:40 +03:00
parent 734b502ad6
commit 00dcbd4d93
25 changed files with 308 additions and 34 deletions
@@ -82,8 +82,7 @@ public object HeuristicSignatures {
val type = typeFromText(typeStr, typeParameters, moduleDescriptor, project)
// now substitute type parameters with actual arguments
val typeArgs = ownerType.getArguments()
val typeArgsMap = typeParameters.indices.map { typeParameters[it] to typeArgs[it] }.toMap()
val typeArgsMap = typeParameters.zip(ownerType.getArguments()).toMap()
val substitutor = TypeUtils.makeSubstitutorForTypeParametersMap(typeArgsMap)
return substitutor.substitute(type, Variance.INVARIANT)
}