Fix some missing operators not getting parsed properly. Fixed field access type checking with depth more than 1.

This commit is contained in:
2025-01-22 22:30:06 +01:00
parent 42c5baa846
commit 8ce8651d6b
5 changed files with 61 additions and 14 deletions

View File

@@ -1621,11 +1621,7 @@ types_compatible :: (checker : *Semantic_Checker, lhs : Type_Variable_Handle, rh
case .Texture2D; {
return rhs_var.type == lhs_var.type;
}
case .Struct; {
if rhs_var.type != .Struct {
return false;
}
case .Struct; {
lhs_node := lhs_var.source_node;
rhs_node := rhs_var.source_node;
@@ -1639,6 +1635,11 @@ types_compatible :: (checker : *Semantic_Checker, lhs : Type_Variable_Handle, rh
}
}
if rhs_var.type != .Struct {
return false;
}
lhs_struct := find_symbol(checker, lhs_var.typename, xx 1);
rhs_struct := find_symbol(checker, rhs_var.typename, xx 1);