Update ExtensionMethodAccess QLDoc

This commit is contained in:
Tony Torralba
2022-03-14 16:41:00 +01:00
committed by Ian Lynagh
parent fcb334180d
commit 4eb1e3a47b

View File

@@ -1959,13 +1959,12 @@ class MethodAccess extends Expr, Call, @methodaccess {
/**
* An invocation of a Kotlin `ExtensionMethod`.
*
* The syntactical qualifier of an extension method is its receiver (arg 0),
* whereas the actual arguments begin at index 1.
*/
class ExtensionMethodAccess extends MethodAccess {
ExtensionMethodAccess() { this.getMethod() instanceof ExtensionMethod }
// The syntactic qualifier of an extension method is its receiver (arg 0),
// whereas the actual arguments begin at index 1.
override Expr getQualifier() { result.isNthChildOf(this, 0) }
override Expr getAnArgument() { result.getIndex() >= 1 and result.getParent() = this }