Allows to use non-constants in the local shader array initializer
This commit is contained in:
parent
8202ba2212
commit
cfcc9ee9c1
1 changed files with 0 additions and 4 deletions
|
@ -3958,10 +3958,6 @@ Error ShaderLanguage::_parse_block(BlockNode *p_block, const Map<StringName, Bui
|
||||||
if (!n) {
|
if (!n) {
|
||||||
return ERR_PARSE_ERROR;
|
return ERR_PARSE_ERROR;
|
||||||
}
|
}
|
||||||
if (n->type != Node::TYPE_CONSTANT) {
|
|
||||||
_set_error("Expected constant expression in the array declaration");
|
|
||||||
return ERR_PARSE_ERROR;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (var.type != n->get_datatype()) {
|
if (var.type != n->get_datatype()) {
|
||||||
_set_error("Invalid assignment of '" + get_datatype_name(n->get_datatype()) + "' to '" + get_datatype_name(var.type) + "'");
|
_set_error("Invalid assignment of '" + get_datatype_name(n->get_datatype()) + "' to '" + get_datatype_name(var.type) + "'");
|
||||||
|
|
Loading…
Add table
Reference in a new issue