function = nxt_mem_cache_zalloc(vm->mem_cache_pool, sizeof(njs_function_t));
if (nxt_fast_path(function != NULL)) {
+ function->object.shared_hash = vm->shared->function_prototype_hash;
function->object.__proto__ =
&vm->prototypes[NJS_PROTOTYPE_FUNCTION].object;
function->args_offset = 1;
"o.constructor === F"),
nxt_string("true") },
+ { nxt_string("function F() { return }"
+ "var o = new F();"
+ "o.__proto__ === F.prototype"),
+ nxt_string("true") },
+
+ { nxt_string("function F(){}; typeof F.prototype"),
+ nxt_string("object") },
+
+ { nxt_string("var F = function (){}; typeof F.prototype"),
+ nxt_string("object") },
+
{ nxt_string("function F() { return Number }"
"var o = new (F())(5);"
"typeof o +' '+ o"),