From 44962b00b2dd93c9b1b88c058b3c8133b24e5cc2 Mon Sep 17 00:00:00 2001 From: Dmitry Petrov Date: Wed, 18 Jul 2018 17:18:00 +0300 Subject: [PATCH] Introduce SyntheticPropertyDescriptor interface --- .../kotlin/synthetic/JavaSyntheticPropertiesScope.kt | 6 +++--- .../kotlin/descriptors/SyntheticPropertyDescriptor.kt | 11 +++++++++++ 2 files changed, 14 insertions(+), 3 deletions(-) create mode 100644 core/descriptors/src/org/jetbrains/kotlin/descriptors/SyntheticPropertyDescriptor.kt diff --git a/compiler/frontend.java/src/org/jetbrains/kotlin/synthetic/JavaSyntheticPropertiesScope.kt b/compiler/frontend.java/src/org/jetbrains/kotlin/synthetic/JavaSyntheticPropertiesScope.kt index 8323576bb35..d9e91b8e40c 100644 --- a/compiler/frontend.java/src/org/jetbrains/kotlin/synthetic/JavaSyntheticPropertiesScope.kt +++ b/compiler/frontend.java/src/org/jetbrains/kotlin/synthetic/JavaSyntheticPropertiesScope.kt @@ -44,9 +44,9 @@ fun canBePropertyAccessor(identifier: String): Boolean { return identifier.startsWith("get") || identifier.startsWith("is") || identifier.startsWith("set") } -interface SyntheticJavaPropertyDescriptor : PropertyDescriptor { - val getMethod: FunctionDescriptor - val setMethod: FunctionDescriptor? +interface SyntheticJavaPropertyDescriptor : PropertyDescriptor, SyntheticPropertyDescriptor { + override val getMethod: FunctionDescriptor + override val setMethod: FunctionDescriptor? companion object { fun findByGetterOrSetter(getterOrSetter: FunctionDescriptor, syntheticScopes: SyntheticScopes): SyntheticJavaPropertyDescriptor? { diff --git a/core/descriptors/src/org/jetbrains/kotlin/descriptors/SyntheticPropertyDescriptor.kt b/core/descriptors/src/org/jetbrains/kotlin/descriptors/SyntheticPropertyDescriptor.kt new file mode 100644 index 00000000000..098117ade3f --- /dev/null +++ b/core/descriptors/src/org/jetbrains/kotlin/descriptors/SyntheticPropertyDescriptor.kt @@ -0,0 +1,11 @@ +/* + * Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license + * that can be found in the license/LICENSE.txt file. + */ + +package org.jetbrains.kotlin.descriptors + +interface SyntheticPropertyDescriptor { + val getMethod: FunctionDescriptor + val setMethod: FunctionDescriptor? +} \ No newline at end of file