Delegated Properties: Analysis adjustments for local delegated properties support
This commit is contained in:
+1
-1
@@ -20,7 +20,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
public interface PropertyAccessorDescriptor extends FunctionDescriptor {
|
||||
public interface PropertyAccessorDescriptor extends VariableAccessorDescriptor {
|
||||
boolean isDefault();
|
||||
|
||||
@NotNull
|
||||
|
||||
@@ -23,10 +23,12 @@ import org.jetbrains.kotlin.types.TypeSubstitutor;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
public interface PropertyDescriptor extends VariableDescriptor, CallableMemberDescriptor {
|
||||
public interface PropertyDescriptor extends VariableDescriptorWithAccessors, CallableMemberDescriptor {
|
||||
@Override
|
||||
@Nullable
|
||||
PropertyGetterDescriptor getGetter();
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
PropertySetterDescriptor getSetter();
|
||||
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
* Copyright 2010-2015 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.descriptors
|
||||
|
||||
public interface VariableAccessorDescriptor : FunctionDescriptor {
|
||||
val correspondingVariable: VariableDescriptorWithAccessors
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
/*
|
||||
* Copyright 2010-2015 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.descriptors
|
||||
|
||||
public interface VariableDescriptorWithAccessors : VariableDescriptor {
|
||||
public val getter: VariableAccessorDescriptor?
|
||||
public val setter: VariableAccessorDescriptor?
|
||||
}
|
||||
+6
@@ -132,6 +132,12 @@ public abstract class PropertyAccessorDescriptorImpl extends DeclarationDescript
|
||||
this.visibility = visibility;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public VariableDescriptorWithAccessors getCorrespondingVariable() {
|
||||
return correspondingProperty;
|
||||
}
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
public PropertyDescriptor getCorrespondingProperty() {
|
||||
|
||||
Reference in New Issue
Block a user