mirror of
https://github.com/godotengine/godot.git
synced 2025-10-26 19:24:18 +00:00
Refactored variant setters/getters
-Discern between named, indexed and keyed -Get direct access to functions for typed GDScript and GDNative bindings -Small changes to some classes in order to work with the new setget binder
This commit is contained in:
parent
709964849f
commit
05de7ce6ca
16 changed files with 1571 additions and 1996 deletions
|
|
@ -2438,7 +2438,7 @@ void GDScriptAnalyzer::reduce_subscript(GDScriptParser::SubscriptNode *p_subscri
|
|||
if (p_subscript->base->is_constant) {
|
||||
// Just try to get it.
|
||||
bool valid = false;
|
||||
Variant value = p_subscript->base->reduced_value.get_named(p_subscript->attribute->name, &valid);
|
||||
Variant value = p_subscript->base->reduced_value.get_named(p_subscript->attribute->name, valid);
|
||||
if (!valid) {
|
||||
push_error(vformat(R"(Cannot get member "%s" from "%s".)", p_subscript->attribute->name, p_subscript->base->reduced_value), p_subscript->index);
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue