mirror of
https://github.com/jerryscript-project/jerryscript.git
synced 2025-12-15 16:29:21 +00:00
Fixing typeof with null argument.
This commit is contained in:
parent
a9856dcf9a
commit
7dcbeec487
@ -1448,7 +1448,7 @@ opfunc_typeof (opcode_t opdata, /**< operation data */
|
|||||||
}
|
}
|
||||||
case ECMA_SIMPLE_VALUE_NULL:
|
case ECMA_SIMPLE_VALUE_NULL:
|
||||||
{
|
{
|
||||||
type_str_p = ecma_get_magic_string (ECMA_MAGIC_STRING_NULL);
|
type_str_p = ecma_get_magic_string (ECMA_MAGIC_STRING_OBJECT);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case ECMA_SIMPLE_VALUE_FALSE:
|
case ECMA_SIMPLE_VALUE_FALSE:
|
||||||
|
|||||||
@ -18,7 +18,7 @@ function f()
|
|||||||
}
|
}
|
||||||
|
|
||||||
assert(typeof(a) === "undefined");
|
assert(typeof(a) === "undefined");
|
||||||
assert(typeof(null) === "null");
|
assert(typeof(null) === "object");
|
||||||
assert(typeof(false) === "false");
|
assert(typeof(false) === "false");
|
||||||
assert(typeof(true) === "true");
|
assert(typeof(true) === "true");
|
||||||
assert(typeof(1) === "number");
|
assert(typeof(1) === "number");
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user