1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 14:38:11 +00:00

LibJS: Fix assignment of const variable on declaration

We were previously assuming that we were reassigning a variable even
when we were not, oops, my bad. :/
This commit is contained in:
0xtechnobabble 2020-03-15 23:57:54 +02:00 committed by Andreas Kling
parent 2a32330257
commit 7aad10d984
3 changed files with 4 additions and 4 deletions

View file

@ -71,7 +71,7 @@ public:
void do_return();
Value get_variable(const String& name);
void set_variable(String name, Value);
void set_variable(String name, Value, bool first_assignment = false);
void declare_variable(String name, DeclarationType);
void gather_roots(Badge<Heap>, HashTable<Cell*>&);