Allow passing non-spread arrays into a vararg parameter after sam properly, through propagating vararg element type to a sam adapter from the original parameter descriptor
This commit is contained in:
committed by
Dmitriy Novozhilov
parent
af3eaf5d71
commit
670f029bdf
+1
-4
@@ -24,11 +24,8 @@ object SamTypeConversions : ParameterTypeConversion {
|
||||
expectedParameterType: UnwrappedType
|
||||
): Boolean {
|
||||
val callComponents = candidate.callComponents
|
||||
val generatingAdditionalSamCandidateIsEnabled =
|
||||
!callComponents.languageVersionSettings.supportsFeature(LanguageFeature.SamConversionPerArgument) &&
|
||||
!callComponents.languageVersionSettings.supportsFeature(LanguageFeature.ProhibitVarargAsArrayAfterSamArgument)
|
||||
|
||||
if (generatingAdditionalSamCandidateIsEnabled) return true
|
||||
if (!callComponents.languageVersionSettings.supportsFeature(LanguageFeature.SamConversionPerArgument)) return true
|
||||
if (expectedParameterType.isNothing()) return true
|
||||
if (expectedParameterType.isFunctionType) return true
|
||||
|
||||
|
||||
Reference in New Issue
Block a user