diff --git a/lib/class-factory.js b/lib/class-factory.js index c066ad4c..f3b76f63 100644 --- a/lib/class-factory.js +++ b/lib/class-factory.js @@ -1647,6 +1647,12 @@ methodPrototype = Object.create(Function.prototype, { env.popLocalFrame(NULL); } } + }, + toString: { + enumerable: true, + value () { + return `function ${this.methodName}(${this.argumentTypes.map(t => t.className).join(', ')}): ${this.returnType.className}`; + } } });