1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-22 15:06:45 +00:00

Add GDScript warning for standalone expression

This makes the error message clearer as it might be used to call
functions with side effects.
This commit is contained in:
George Marques
2020-01-09 08:30:14 -03:00
parent e7b7dc57fc
commit 7d4fc79eb3
3 changed files with 10 additions and 1 deletions

View File

@@ -297,6 +297,7 @@ struct GDScriptWarning {
UNSAFE_CAST, // Cast used in an unknown type
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
WARNING_MAX,
} code;
Vector<String> symbols;