Fix minor race condition

This commit is contained in:
gingerBill
2022-12-19 00:29:40 +00:00
parent 01b508f182
commit a13e2f4578
2 changed files with 43 additions and 10 deletions
+5
View File
@@ -158,6 +158,7 @@ struct DeclInfo {
bool is_using;
bool where_clauses_evaluated;
bool proc_checked;
BlockingMutex proc_checked_mutex;
isize defer_used;
bool defer_use_checked;
@@ -377,13 +378,17 @@ struct CheckerInfo {
};
struct CheckerContext {
// Order matters here
BlockingMutex mutex;
Checker * checker;
CheckerInfo * info;
AstPackage * pkg;
AstFile * file;
Scope * scope;
DeclInfo * decl;
// Order doesn't matter after this
u32 state_flags;
bool in_defer; // TODO(bill): Actually handle correctly
Type * type_hint;