Skip to content

Commit 154fe14

Browse files
committed
Make Function.prototype a function
Issue #561
1 parent f6684e8 commit 154fe14

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/infer.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -735,7 +735,8 @@
735735
cx.topScope = new Scope();
736736
cx.topScope.name = "<top>";
737737
cx.protos.Array = new Obj(true, "Array.prototype");
738-
cx.protos.Function = new Obj(true, "Function.prototype");
738+
cx.protos.Function = new Fn("Function.prototype", ANull, [], [], ANull);
739+
cx.protos.Function.proto = cx.protos.Object;
739740
cx.protos.RegExp = new Obj(true, "RegExp.prototype");
740741
cx.protos.String = new Obj(true, "String.prototype");
741742
cx.protos.Number = new Obj(true, "Number.prototype");

0 commit comments

Comments
 (0)