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
commit 7aad10d984
Notes: sideshowbarker 2024-07-19 08:17:03 +09:00
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*>&);