Search in sources :

Example 1 with PropertyAccessorDescriptor

use of org.jetbrains.kotlin.descriptors.PropertyAccessorDescriptor in project kotlin by JetBrains.

the class ControlFlowAnalyzer method checkProperty.

private void checkProperty(@NotNull BodiesResolveContext c, KtProperty property, PropertyDescriptor propertyDescriptor) {
    for (KtPropertyAccessor accessor : property.getAccessors()) {
        PropertyAccessorDescriptor accessorDescriptor = accessor.isGetter() ? propertyDescriptor.getGetter() : propertyDescriptor.getSetter();
        assert accessorDescriptor != null : "no property accessor descriptor " + accessor.getText();
        KotlinType returnType = accessorDescriptor.getReturnType();
        checkFunction(c, accessor, returnType);
    }
}
Also used : KotlinType(org.jetbrains.kotlin.types.KotlinType) PropertyAccessorDescriptor(org.jetbrains.kotlin.descriptors.PropertyAccessorDescriptor)

Aggregations

PropertyAccessorDescriptor (org.jetbrains.kotlin.descriptors.PropertyAccessorDescriptor)1 KotlinType (org.jetbrains.kotlin.types.KotlinType)1