mirror of
https://github.com/github/codeql.git
synced 2026-05-04 13:15:21 +02:00
JS: use inheritance in js/mixed-static-instance-this-access
This commit is contained in:
@@ -1,2 +1,3 @@
|
||||
| instanceStatic.js:3:9:3:16 | this.baz | Access to instance method $@ from static method $@ is not possible through `this`. | instanceStatic.js:5:5:7:5 | baz(){\\n\\n } | baz | instanceStatic.js:2:5:4:5 | static ... K\\n } | bar |
|
||||
| staticInstance.js:3:9:3:16 | this.baz | Access to static method $@ from instance method $@ is not possible through `this`. | staticInstance.js:5:5:6:5 | static baz(){\\n } | baz | staticInstance.js:2:5:4:5 | bar(){\\n ... K\\n } | bar |
|
||||
| tst.js:66:9:66:14 | this.f | Access to instance method $@ from static method $@ is not possible through `this`. | tst.js:60:5:62:5 | f() {\\n\\n } | f | tst.js:65:5:67:5 | static ... K\\n } | test |
|
||||
|
||||
@@ -41,3 +41,28 @@ class C4 {
|
||||
}
|
||||
}
|
||||
C4.f = x;
|
||||
|
||||
class C5_super {
|
||||
f() {
|
||||
|
||||
}
|
||||
}
|
||||
class C5 extends C5_super{
|
||||
static f() {
|
||||
|
||||
}
|
||||
test() {
|
||||
this.f; // OK
|
||||
}
|
||||
}
|
||||
|
||||
class C6_super {
|
||||
f() {
|
||||
|
||||
}
|
||||
}
|
||||
class C6 extends C6_super{
|
||||
static test() {
|
||||
this.f; // NOT OK
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user