Better smart completion after "by" for override property with no explicit type specified

This commit is contained in:
Valentin Kipyatkov
2016-04-01 15:52:36 +03:00
parent f85de3aac7
commit 7af67da4ac
3 changed files with 37 additions and 0 deletions
@@ -615,6 +615,7 @@ class ExpectedInfos(
?: property.builtIns.nullableNothingType.toFuzzyType(emptyList())
val explicitPropertyType = property.fuzzyReturnType()?.check { propertyDeclaration.typeReference != null }
?: property.overriddenDescriptors.singleOrNull()?.fuzzyReturnType() // for override properties use super property type as explicit (if not specified)
val typesWithGetDetector = TypesWithGetValueDetector(scope, indicesHelper, propertyOwnerType, explicitPropertyType)
val typesWithSetDetector = if (property.isVar) TypesWithSetValueDetector(scope, indicesHelper, propertyOwnerType) else null