Migrate descriptor-related util from IR to FE1.0
so that FE1.0 UAST can avoid depending on backend IR ^KTIJ-23602
This commit is contained in:
@@ -27,4 +27,24 @@ fun PropertyAccessorDescriptor.hasBody(): Boolean {
|
||||
|
||||
fun isBackingFieldReference(descriptor: DeclarationDescriptor?): Boolean {
|
||||
return descriptor is SyntheticFieldDescriptor
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return naturally-ordered list of the parameters that can have values specified at call site.
|
||||
*/
|
||||
val CallableDescriptor.explicitParameters: List<ParameterDescriptor>
|
||||
get() {
|
||||
val result = ArrayList<ParameterDescriptor>(valueParameters.size + 2)
|
||||
|
||||
this.dispatchReceiverParameter?.let {
|
||||
result.add(it)
|
||||
}
|
||||
|
||||
this.extensionReceiverParameter?.let {
|
||||
result.add(it)
|
||||
}
|
||||
|
||||
result.addAll(valueParameters)
|
||||
|
||||
return result
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user