Minor optimization

This commit is contained in:
Valentin Kipyatkov
2015-07-09 20:52:16 +03:00
parent 962bef6584
commit 42678bc79a
@@ -42,6 +42,9 @@ interface SyntheticExtensionPropertyDescriptor : PropertyDescriptor {
companion object {
fun findByGetterOrSetter(getterOrSetter: FunctionDescriptor, resolutionScope: JetScope): SyntheticExtensionPropertyDescriptor? {
val name = getterOrSetter.getName()
if (propertyNameByGetMethodName(name) == null && propertyNameBySetMethodName(name) == null) return null // optimization
val owner = getterOrSetter.getContainingDeclaration()
if (owner !is JavaClassDescriptor) return null