12
12
import javascript
13
13
14
14
/** Holds if `base` declares or inherits method `m` with the given `name`. */
15
- predicate hasMethod ( ClassDefinition base , string name , MethodDefinition m ) {
15
+ predicate hasMethod ( ClassDefinition base , string name , MethodDeclaration m ) {
16
16
m = base .getMethod ( name ) or
17
17
hasMethod ( base .getSuperClassDefinition ( ) , name , m )
18
18
}
@@ -22,7 +22,7 @@ predicate hasMethod(ClassDefinition base, string name, MethodDefinition m) {
22
22
* where `fromMethod` and `toMethod` are of kind `fromKind` and `toKind`, respectively.
23
23
*/
24
24
predicate isLocalMethodAccess (
25
- PropAccess access , MethodDefinition fromMethod , string fromKind , MethodDefinition toMethod ,
25
+ PropAccess access , MethodDefinition fromMethod , string fromKind , MethodDeclaration toMethod ,
26
26
string toKind
27
27
) {
28
28
hasMethod ( fromMethod .getDeclaringClass ( ) , access .getPropertyName ( ) , toMethod ) and
@@ -32,7 +32,7 @@ predicate isLocalMethodAccess(
32
32
toKind = getKind ( toMethod )
33
33
}
34
34
35
- string getKind ( MethodDefinition m ) {
35
+ string getKind ( MethodDeclaration m ) {
36
36
if m .isStatic ( ) then result = "static" else result = "instance"
37
37
}
38
38
0 commit comments