Use original type parameters for SAM adapter to constructor
It makes SAM descriptors more consistent with real ones
This commit is contained in:
+4
@@ -289,6 +289,10 @@ public class SingleAbstractMethodUtils {
|
||||
@NotNull List<TypeParameterDescriptor> originalParameters,
|
||||
@Nullable DeclarationDescriptor newOwner
|
||||
) {
|
||||
if (newOwner instanceof SamAdapterConstructorDescriptor) {
|
||||
return new TypeParameters(originalParameters, TypeSubstitutor.EMPTY);
|
||||
}
|
||||
|
||||
Map<TypeParameterDescriptor, TypeParameterDescriptorImpl> traitToFunTypeParameters =
|
||||
JavaResolverUtils.recreateTypeParametersAndReturnMapping(originalParameters, newOwner);
|
||||
TypeSubstitutor typeParametersSubstitutor = JavaResolverUtils.createSubstitutorForTypeParameters(traitToFunTypeParameters);
|
||||
|
||||
Reference in New Issue
Block a user