Allow using a struct name as a variable name in shaders

This commit is contained in:
Chaosus 2026-02-28 15:08:00 +03:00
parent 634220e9fc
commit 9c3e52f38e

View file

@ -8022,7 +8022,7 @@ Error ShaderLanguage::_parse_block(BlockNode *p_block, const FunctionInfo &p_fun
}
}
bool is_struct = shader->structs.has(tk.text);
bool is_struct = shader->structs.has(tk.text) && !(p_block && _find_identifier(p_block, false, p_function_info, tk.text));
bool is_var_init = false;
bool is_condition = false;