You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-13 13:31:48 +00:00
GDScript: Don't coerce default values to the export hint type
This behavior is inconsistent with non tools builds and can create issues. Instead, a warning is emitted if there's a type mismatch. If the type can't be converted, an error is shown instead. For the editor it gives a converted value to avoid issues with the property editor, which expects the correct type.
This commit is contained in:
@@ -304,6 +304,7 @@ struct GDScriptWarning {
|
||||
UNSAFE_CALL_ARGUMENT, // Function call argument is of a supertype of the require argument
|
||||
DEPRECATED_KEYWORD, // The keyword is deprecated and should be replaced
|
||||
STANDALONE_TERNARY, // Return value of ternary expression is discarded
|
||||
EXPORT_HINT_TYPE_MISTMATCH, // The type of the variable's default value doesn't match its export hint
|
||||
WARNING_MAX,
|
||||
} code;
|
||||
Vector<String> symbols;
|
||||
|
||||
Reference in New Issue
Block a user