Forráskód Böngészése

[4.0] GDScript: Treat `BitField<Enum>` as `int` (not `Enum`)

Danil Alexeev 2 éve
szülő
commit
74ac827ac7
1 módosított fájl, 2 hozzáadás és 1 törlés
  1. 2 1
      modules/gdscript/gdscript_analyzer.cpp

+ 2 - 1
modules/gdscript/gdscript_analyzer.cpp

@@ -4567,7 +4567,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;
@@ -4579,6 +4579,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;