Smart completion: generic functions are correctly included into the list
#KT-6375 Fixed
This commit is contained in:
+1
@@ -108,6 +108,7 @@ public class ValueParameterDescriptorImpl extends VariableDescriptorImpl impleme
|
||||
@NotNull
|
||||
@Override
|
||||
public ValueParameterDescriptor substitute(@NotNull TypeSubstitutor substitutor) {
|
||||
if (substitutor.isEmpty()) return this;
|
||||
throw new UnsupportedOperationException(); // TODO
|
||||
}
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@ import org.jetbrains.jet.lang.types.JetType
|
||||
import org.jetbrains.jet.lang.types.Flexibility
|
||||
import org.jetbrains.jet.lang.types.TypeConstructor
|
||||
import org.jetbrains.jet.utils.toReadOnlyList
|
||||
import org.jetbrains.jet.lang.types.checker.JetTypeChecker
|
||||
|
||||
fun JetType.getContainedTypeParameters(): Collection<TypeParameterDescriptor> {
|
||||
val declarationDescriptor = getConstructor().getDeclarationDescriptor()
|
||||
@@ -59,3 +60,6 @@ public fun JetType.getContainedAndCapturedTypeParameterConstructors(): Collectio
|
||||
return typeParameters.map { it.getTypeConstructor() }.toReadOnlyList()
|
||||
}
|
||||
|
||||
public fun JetType.isSubtypeOf(superType: JetType): Boolean = JetTypeChecker.DEFAULT.isSubtypeOf(this, superType)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user