summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/gdscript_analyzer.cpp
diff options
context:
space:
mode:
authorDanil Alexeev <danil@alexeev.xyz>2023-04-05 17:46:22 +0300
committerDanil Alexeev <danil@alexeev.xyz>2023-04-07 10:43:21 +0300
commit9df96e97ea92c56dd6850e92dd3d9fda58f1a29c (patch)
treebacaede871ddf212c85b87ee74df9304d05be7e7 /modules/gdscript/gdscript_analyzer.cpp
parent132000f58d545cbf537cb751cb787d48c0b2085b (diff)
downloadredot-engine-9df96e97ea92c56dd6850e92dd3d9fda58f1a29c.tar.gz
GDScript: Misc fixes and improvements for signature generation
* Use type hints for `@GlobalScope` enums. * Use plain `int` for `BitMask<T>`. * Fix type hints for typed arrays. * Use `Variant` and `void` type hints. * Discard unnecessary class prefix.
Diffstat (limited to 'modules/gdscript/gdscript_analyzer.cpp')
-rw-r--r--modules/gdscript/gdscript_analyzer.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/gdscript/gdscript_analyzer.cpp b/modules/gdscript/gdscript_analyzer.cpp
index a2cab25ce8..76c746f9d1 100644
--- a/modules/gdscript/gdscript_analyzer.cpp
+++ b/modules/gdscript/gdscript_analyzer.cpp
@@ -4546,7 +4546,7 @@ GDScriptParser::DataType GDScriptAnalyzer::type_from_property(const PropertyInfo
result.set_container_element_type(elem_type);
} else if (p_property.type == Variant::INT) {
// Check if it's enum.
- if ((p_property.usage & (PROPERTY_USAGE_CLASS_IS_ENUM | PROPERTY_USAGE_CLASS_IS_BITFIELD)) && p_property.class_name != StringName()) {
+ if ((p_property.usage & PROPERTY_USAGE_CLASS_IS_ENUM) && p_property.class_name != StringName()) {
if (CoreConstants::is_global_enum(p_property.class_name)) {
result = make_global_enum_type(p_property.class_name, StringName(), false);
result.is_constant = false;
@@ -4558,6 +4558,7 @@ GDScriptParser::DataType GDScriptAnalyzer::type_from_property(const PropertyInfo
}
}
}
+ // PROPERTY_USAGE_CLASS_IS_BITFIELD: BitField[T] isn't supported (yet?), use plain int.
}
}
return result;