@@ -19,11 +19,12 @@ TemplateClass getADependentBaseType(TemplateClass t) {
19
19
20
20
/**
21
21
* Gets a function call in `TemplateClass` `t` where the target function name exists in a dependent
22
- * base type and the function does not call that function .
22
+ * base type and the call is to a function that is not declared in the dependent base type .
23
23
*/
24
24
FunctionCall parentMemberFunctionCall ( TemplateClass t ) {
25
25
exists ( TemplateClass dependentBaseType , MemberFunction dependentTypeFunction , Function target |
26
26
dependentBaseType = getADependentBaseType ( t ) and
27
+ // The target of the call is not declared in the dependent base type
27
28
not target .getDeclaringType ( ) = dependentBaseType and
28
29
dependentBaseType .getAMember ( ) = dependentTypeFunction and
29
30
target .getName ( ) = dependentTypeFunction .getName ( ) and
@@ -33,12 +34,13 @@ FunctionCall parentMemberFunctionCall(TemplateClass t) {
33
34
}
34
35
35
36
/**
36
- * There is a `MemberFunction` in parent class with same name
37
- * as a `FunctionAccess` that exists in a child `MemberFunction`
37
+ * Gets a function access in `TemplateClass` `t` where the target function name exists in a dependent
38
+ * base type and the access is to a function declared outside the dependent base type.
38
39
*/
39
40
FunctionAccess parentMemberFunctionAccess ( TemplateClass t ) {
40
41
exists ( TemplateClass dependentBaseType , MemberFunction dependentTypeFunction , Function target |
41
42
dependentBaseType = getADependentBaseType ( t ) and
43
+ // The target of the access is not declared in the dependent base type
42
44
not target .getDeclaringType ( ) = dependentBaseType and
43
45
dependentBaseType .getAMember ( ) = dependentTypeFunction and
44
46
target .getName ( ) = dependentTypeFunction .getName ( ) and
@@ -48,14 +50,15 @@ FunctionAccess parentMemberFunctionAccess(TemplateClass t) {
48
50
}
49
51
50
52
/**
51
- * There is a `MemberVariable` in parent class with same name
52
- * as a `VariableAccess` that exists in a child `MemberFunction`
53
+ * Gets a memmber access in `TemplateClass` `t` where the target member name exists in a dependent
54
+ * base type and the access is to a variable declared outside the dependent base type.
53
55
*/
54
56
Access parentMemberAccess ( TemplateClass t ) {
55
57
exists (
56
58
TemplateClass dependentBaseType , MemberVariable dependentTypeMemberVariable , Variable target
57
59
|
58
60
dependentBaseType = getADependentBaseType ( t ) and
61
+ // The target of the access is not declared in the dependent base type
59
62
not target .getDeclaringType ( ) = dependentBaseType and
60
63
dependentBaseType .getAMemberVariable ( ) = dependentTypeMemberVariable and
61
64
target .getName ( ) = dependentTypeMemberVariable .getName ( ) and
0 commit comments