1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Fix incorrect parsing array's length() at return statement in shader

This commit is contained in:
Yuri Roubinsky
2022-04-03 09:52:41 +03:00
parent 9c5818d212
commit 0864c9abaa
2 changed files with 6 additions and 9 deletions

View File

@@ -451,8 +451,8 @@ public:
int array_size = 0;
bool is_local = false;
virtual DataType get_datatype() const override { return datatype_cache; }
virtual String get_datatype_name() const override { return String(struct_name); }
virtual DataType get_datatype() const override { return call_expression ? call_expression->get_datatype() : datatype_cache; }
virtual String get_datatype_name() const override { return call_expression ? call_expression->get_datatype_name() : String(struct_name); }
virtual int get_array_size() const override { return (index_expression || call_expression) ? 0 : array_size; }
virtual bool is_indexed() const override { return index_expression != nullptr; }
@@ -558,8 +558,8 @@ public:
Node *call_expression = nullptr;
bool has_swizzling_duplicates = false;
virtual DataType get_datatype() const override { return datatype; }
virtual String get_datatype_name() const override { return String(struct_name); }
virtual DataType get_datatype() const override { return call_expression ? call_expression->get_datatype() : datatype; }
virtual String get_datatype_name() const override { return call_expression ? call_expression->get_datatype_name() : String(struct_name); }
virtual int get_array_size() const override { return (index_expression || call_expression) ? 0 : array_size; }
virtual bool is_indexed() const override { return index_expression != nullptr || call_expression != nullptr; }