mirror of
https://github.com/github/codeql.git
synced 2026-04-22 23:35:14 +02:00
Added failing test with method as field
This commit is contained in:
@@ -2,6 +2,8 @@ spuriousCallee
|
||||
missingCallee
|
||||
| constructor-field.ts:40:5:40:14 | f3.build() | constructor-field.ts:13:3:13:12 | build() {} | -1 | calls |
|
||||
| constructor-field.ts:71:1:71:11 | bf3.build() | constructor-field.ts:13:3:13:12 | build() {} | -1 | calls |
|
||||
| prototypes.js:117:5:117:19 | this.tmpClass() | prototypes.js:113:1:113:22 | functio ... ss() {} | -1 | calls |
|
||||
| prototypes.js:131:5:131:23 | this.tmpPrototype() | prototypes.js:127:1:127:26 | functio ... pe() {} | -1 | calls |
|
||||
badAnnotation
|
||||
accessorCall
|
||||
| accessors.js:12:1:12:5 | obj.f | accessors.js:5:8:5:12 | () {} |
|
||||
|
||||
@@ -107,3 +107,36 @@ class Derived2 {}
|
||||
Derived2.prototype = Object.create(Base.prototype);
|
||||
/** name:Derived2.read */
|
||||
Derived2.prototype.read = function() {};
|
||||
|
||||
|
||||
/** name:BanClass.tmpClass */
|
||||
function tmpClass() {}
|
||||
|
||||
function callerClass() {
|
||||
/** calls:BanClass.tmpClass */
|
||||
this.tmpClass();
|
||||
}
|
||||
class BanClass {
|
||||
constructor() {
|
||||
this.tmpClass = tmpClass;
|
||||
this.callerClass = callerClass;
|
||||
}
|
||||
}
|
||||
|
||||
/** name:BanProtytpe.tmpPrototype */
|
||||
function tmpPrototype() {}
|
||||
|
||||
function callerPrototype() {
|
||||
/** calls:BanProtytpe.tmpPrototype */
|
||||
this.tmpPrototype();
|
||||
}
|
||||
|
||||
function BanProtytpe() {
|
||||
this.tmpPrototype = tmpPrototype;
|
||||
this.callerPrototype = callerPrototype;
|
||||
}
|
||||
|
||||
function banInstantiation(){
|
||||
const instance = new BanProtytpe();
|
||||
instance.callerPrototype();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user