mirror of
https://github.com/odin-lang/Odin.git
synced 2026-02-14 15:23:15 +00:00
Merge pull request #5973 from FrancisTheCat/master
Fix #5967 (Incorrect stack overflow warning for by ref switches over unions)
This commit is contained in:
@@ -790,8 +790,10 @@ gb_internal void check_scope_usage_internal(Checker *c, Scope *scope, u64 vet_fl
|
||||
// Is >256 KiB good enough?
|
||||
if (sz > 1ll<<18) {
|
||||
bool is_ref = false;
|
||||
if((e->flags & EntityFlag_ForValue) != 0) {
|
||||
if ((e->flags & EntityFlag_ForValue) != 0) {
|
||||
is_ref = type_deref(e->Variable.for_loop_parent_type) != NULL;
|
||||
} else if ((e->flags & EntityFlag_SwitchValue) != 0) {
|
||||
is_ref = !(e->flags & EntityFlag_Value);
|
||||
}
|
||||
if(!is_ref) {
|
||||
gbString type_str = type_to_string(e->type);
|
||||
|
||||
Reference in New Issue
Block a user