Fix indexing issue breaking function declarations.
This commit is contained in:
@@ -21,8 +21,8 @@ Semantic_Type :: enum {
|
||||
Half :: 1;
|
||||
Float :: 2;
|
||||
Double :: 3;
|
||||
Texture2D :: 8;
|
||||
Sampler :: 9;
|
||||
Texture2D :: 4;
|
||||
Sampler :: 5;
|
||||
|
||||
Max_Builtin :: Sampler + 1;
|
||||
|
||||
@@ -49,8 +49,8 @@ Typenames :: string.[
|
||||
"half" ,
|
||||
"float" ,
|
||||
"double" ,
|
||||
"sampler" ,
|
||||
"texture2D",
|
||||
"sampler" ,
|
||||
];
|
||||
|
||||
Type_Variable :: struct {
|
||||
@@ -1015,7 +1015,7 @@ declare_function :: (checker : *Semantic_Checker, node : *AST_Node, builtin : bo
|
||||
all_same : bool = true;
|
||||
for i : 0..func_var.child_count - 1 {
|
||||
arg := func_var.children[i];
|
||||
node_child := field_list.children[it_index];
|
||||
node_child := field_list.children[i];
|
||||
|
||||
typename : string;
|
||||
arg_type := get_type_from_identifier(checker, checker.current_scope, node_child, *typename);
|
||||
|
||||
Reference in New Issue
Block a user