mirror of
https://github.com/github/codeql.git
synced 2026-04-26 09:15:12 +02:00
JS: Also add tests for upward calls and overriding
This commit is contained in:
@@ -7,6 +7,9 @@ class Base {
|
||||
|
||||
/** calls:NONE */
|
||||
this.methodInSub();
|
||||
|
||||
/** calls:overridenInSub0 */
|
||||
this.overridenInSub();
|
||||
}
|
||||
|
||||
/** name:methodInBase */
|
||||
@@ -14,24 +17,44 @@ class Base {
|
||||
/** calls:NONE */
|
||||
this.methodInSub();
|
||||
}
|
||||
|
||||
/** name:overridenInSub0 */
|
||||
overridenInSub() {
|
||||
}
|
||||
}
|
||||
|
||||
class Subclass1 extends Base {
|
||||
workInSub() {
|
||||
/** calls:methodInBase */
|
||||
this.methodInBase();
|
||||
|
||||
/** calls:overridenInSub1 */
|
||||
this.overridenInSub();
|
||||
}
|
||||
|
||||
/** name:methodInSub1 */
|
||||
methodInSub() {
|
||||
}
|
||||
|
||||
/** name:overridenInSub1 */
|
||||
overridenInSub() {
|
||||
}
|
||||
}
|
||||
|
||||
class Subclass2 extends Base {
|
||||
workInSub() {
|
||||
/** calls:methodInBase */
|
||||
this.methodInBase();
|
||||
|
||||
/** calls:overridenInSub2 */
|
||||
this.overridenInSub();
|
||||
}
|
||||
|
||||
/** name:methodInSub2 */
|
||||
methodInSub() {
|
||||
}
|
||||
|
||||
/** name:overridenInSub2 */
|
||||
overridenInSub() {
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user