fix: converts symbol key to string when assigning function to member
This commit is contained in:
parent
4e18c76bb1
commit
ea158c1e60
@ -237,7 +237,10 @@ public abstract class Value {
|
||||
}
|
||||
|
||||
if (defineOwnMember(env, key, val)) {
|
||||
if (val instanceof FunctionValue) ((FunctionValue)val).setName(key.toString(env));
|
||||
if (val instanceof FunctionValue func) {
|
||||
if (key.isSymbol()) func.setName(key.toSymbol().toString());
|
||||
else func.setName(key.toString(env));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
else return false;
|
||||
|
Loading…
Reference in New Issue
Block a user