KT-10664 No code completion after variable initialized with elvis

#KT-10664 Fixed
This commit is contained in:
Valentin Kipyatkov
2016-01-14 14:02:26 +03:00
parent b41f2dcda3
commit 7c6a33a36c
4 changed files with 24 additions and 3 deletions
@@ -73,12 +73,12 @@ public class SmartCastManager {
@NotNull DeclarationDescriptor containingDeclarationOrModule,
@NotNull DataFlowInfo dataFlowInfo
) {
final List<KotlinType> variants = getSmartCastVariants(receiverToCast, bindingContext,
containingDeclarationOrModule, dataFlowInfo);
final List<KotlinType> variants = CollectionsKt.distinct(
getSmartCastVariants(receiverToCast, bindingContext, containingDeclarationOrModule, dataFlowInfo));
return CollectionsKt.filter(variants, new Function1<KotlinType, Boolean>() {
@Override
public Boolean invoke(final KotlinType type) {
return !CollectionsKt.any(variants, new Function1<KotlinType, Boolean>() {
return CollectionsKt.none(variants, new Function1<KotlinType, Boolean>() {
@Override
public Boolean invoke(KotlinType another) {
return another != type && KotlinTypeChecker.DEFAULT.isSubtypeOf(another, type);