diff --git a/ts2panda/src/base/typeSystem.ts b/ts2panda/src/base/typeSystem.ts index cc06969f4910ab7bd2014dca7c8938a0d7e121eb..aeade0bfc89389fad1763815f43a39b8ba7ecfd8 100644 --- a/ts2panda/src/base/typeSystem.ts +++ b/ts2panda/src/base/typeSystem.ts @@ -395,8 +395,8 @@ export class ClassType extends BaseType { // Then, get the typeIndex and fill in the methods array let typeIndex = this.tryGetTypeIndex(member); - let funcModifier = funcType.getModifier(); - if (funcModifier) { + let isStatic = funcType.hasModifier(Modifier.STATIC); + if (isStatic) { this.staticMethods.set(funcType.getFunctionName(), typeIndex!); } else { this.methods.set(funcType.getFunctionName(), typeIndex!); @@ -596,6 +596,10 @@ export class FunctionType extends BaseType { return this.modifiers; } + hasModifier(modifier: Modifier) { + return (this.modifiers & modifier) ? true : false; + } + transfer2LiteralBuffer(): LiteralBuffer { let funcTypeBuf = new LiteralBuffer(); let funcTypeLiterals: Array = new Array();