mirror of
https://github.com/github/codeql.git
synced 2026-04-29 10:45:15 +02:00
JS: Add CG test showing lack of calls down to subclasses
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
import 'dummy';
|
||||
|
||||
class Base {
|
||||
workInBase() {
|
||||
/** calls:methodInBase */
|
||||
this.methodInBase();
|
||||
|
||||
/** calls:NONE */
|
||||
this.methodInSub();
|
||||
}
|
||||
|
||||
/** name:methodInBase */
|
||||
methodInBase() {
|
||||
/** calls:NONE */
|
||||
this.methodInSub();
|
||||
}
|
||||
}
|
||||
|
||||
class Subclass1 extends Base {
|
||||
workInSub() {
|
||||
/** calls:methodInBase */
|
||||
this.methodInBase();
|
||||
}
|
||||
|
||||
methodInSub() {
|
||||
}
|
||||
}
|
||||
|
||||
class Subclass2 extends Base {
|
||||
workInSub() {
|
||||
/** calls:methodInBase */
|
||||
this.methodInBase();
|
||||
}
|
||||
|
||||
methodInSub() {
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user