Added failing test with method as field

This commit is contained in:
Napalys Klicius
2025-04-30 19:55:42 +02:00
parent c0917434eb
commit 7430d0e5e0
2 changed files with 35 additions and 0 deletions

View File

@@ -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 | () {} |

View File

@@ -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();
}