mirror of
https://github.com/github/codeql.git
synced 2026-04-29 02:35:15 +02:00
Add ExtensionMethod class
This commit is contained in:
@@ -1059,3 +1059,7 @@ ktBreakContinueTarget(
|
||||
unique int id: @breakcontinuestmt ref,
|
||||
int target: @ktloopstmt ref
|
||||
)
|
||||
|
||||
ktExtensionFunctions(
|
||||
unique int id: @method ref
|
||||
)
|
||||
|
||||
@@ -670,3 +670,13 @@ class Field extends Member, ExprParent, @field, Variable {
|
||||
class InstanceField extends Field {
|
||||
InstanceField() { not this.isStatic() }
|
||||
}
|
||||
|
||||
/** A Kotlin extension function. */
|
||||
class ExtensionMethod extends Method {
|
||||
ExtensionMethod() { ktExtensionFunctions(this) }
|
||||
|
||||
/** Gets the type being extended by this method. */
|
||||
Type getExtendedType() { result = getParameter(-1).getType() }
|
||||
|
||||
override string getAPrimaryQlClass() { result = "ExtensionMethod" }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user