Some initial parse output. Enforce handling of optionals. Fix issue where constants were folded despite the fact that they shouldn't be. Fix bug related to return foo() where foo() returns void!. (#893)

This commit is contained in:
Christoffer Lerno
2023-07-27 22:58:41 +02:00
committed by GitHub
parent d0fa473d61
commit ada3ea08fc
23 changed files with 685 additions and 312 deletions

View File

@@ -141,7 +141,7 @@ fn void Object.free(&self)
{
foreach (key : self.map.key_tlist())
{
self.map.get(key).free();
(void)self.map.get(key).free();
free(key, .using = self.allocator);
}
self.map.free();
@@ -197,7 +197,7 @@ fn void Object.set_object(&self, String key, Object* new_object) @private
defer
{
(void)free(entry.key, .using = self.allocator);
entry.value.free();
(void)entry.value.free();
}
self.map.set(key.copy(self.map.allocator), new_object);
}