Update uneval to handle Symbol (#444)

Signed-off-by: Boram Bae <boram21.bae@samsung.com>
This commit is contained in:
Boram Bae 2019-10-01 14:48:48 +09:00 committed by Patrick Kim
commit 67e18df5f3
2 changed files with 3 additions and 10 deletions

View file

@ -225,6 +225,9 @@ static ValueRef* builtinRun(ExecutionStateRef* state, ValueRef* thisValue, size_
static ValueRef* builtinUneval(ExecutionStateRef* state, ValueRef* thisValue, size_t argc, ValueRef** argv, bool isConstructCall)
{
if (argc) {
if (argv[0]->isSymbol()) {
return argv[0]->asSymbol()->symbolDescriptiveString();
}
return argv[0]->toString(state);
}
return StringRef::emptyString();