From f86dcd4e67a7e715233cc87a265e8ef79a27348d Mon Sep 17 00:00:00 2001 From: Danil Alexeev Date: Thu, 21 Nov 2024 21:45:56 +0300 Subject: [PATCH] GDScript: Support tracking multiple analyzer and runtime errors in tests --- .pre-commit-config.yaml | 4 +- .../gdscript/tests/gdscript_test_runner.cpp | 77 ++++++++--------- modules/gdscript/tests/scripts/.editorconfig | 5 +- .../errors/abstract_class_instantiate.gd | 8 ++ .../errors/abstract_class_instantiate.out | 5 +- .../errors/abstract_script_instantiate.gd | 9 -- .../errors/abstract_script_instantiate.out | 2 - .../annotation_non_constant_parameter.out | 2 +- .../scripts/analyzer/errors/assign_enum.out | 2 +- .../analyzer/errors/assign_named_enum.out | 2 +- .../scripts/analyzer/errors/assign_signal.out | 2 +- .../errors/assign_to_read_only_property.out | 2 +- ...ssign_to_read_only_property_indirectly.out | 2 +- .../errors/assymetric_assignment_bad.out | 3 +- .../analyzer/errors/await_signal_no_infer.out | 2 +- .../errors/bitwise_float_left_operand.out | 2 +- .../errors/bitwise_float_right_operand.out | 2 +- .../call_not_existing_static_method.out | 2 +- .../analyzer/errors/cast_int_to_array.out | 2 +- .../analyzer/errors/cast_int_to_object.out | 2 +- .../analyzer/errors/cast_object_to_int.out | 2 +- .../class_name_shadows_builtin_type.out | 2 +- .../errors/constant_array_index_assign.out | 2 +- .../constant_dictionary_index_assign.out | 2 +- .../constant_name_shadows_builtin_type.out | 2 +- .../errors/constant_subscript_type.out | 2 +- .../errors/constant_used_as_function.out | 3 +- .../analyzer/errors/constructor_call_type.out | 2 +- .../analyzer/errors/cyclic_inheritance.out | 2 +- .../analyzer/errors/cyclic_ref_const.out | 3 +- .../analyzer/errors/cyclic_ref_enum.out | 3 +- .../analyzer/errors/cyclic_ref_enum_value.out | 2 +- .../analyzer/errors/cyclic_ref_external.out | 3 +- .../errors/cyclic_ref_external_a.notest.gd | 2 + .../analyzer/errors/cyclic_ref_func.out | 3 +- .../analyzer/errors/cyclic_ref_override.out | 2 +- .../analyzer/errors/cyclic_ref_var.out | 3 +- .../analyzer/errors/cyclic_ref_var_self.out | 3 +- .../errors/dictionary_duplicate_key_lua.out | 2 +- ...ctionary_duplicate_key_lua_with_string.out | 2 +- .../dictionary_duplicate_key_python.out | 2 +- ...ictionary_string_stringname_equivalent.out | 2 +- .../errors/engine_singleton_instantiate.out | 2 +- .../analyzer/errors/enum_bad_method.out | 2 +- .../analyzer/errors/enum_bad_value.out | 2 +- ..._class_var_assign_with_wrong_enum_type.out | 3 +- ...um_class_var_init_with_wrong_enum_type.out | 3 +- .../errors/enum_duplicate_bad_method.out | 2 +- .../analyzer/errors/enum_float_value.out | 2 +- .../enum_function_parameter_wrong_type.out | 3 +- .../enum_function_return_wrong_type.out | 3 +- ..._var_assign_outer_with_wrong_enum_type.out | 3 +- ..._local_var_assign_with_wrong_enum_type.out | 3 +- ...um_local_var_init_with_wrong_enum_type.out | 3 +- .../errors/enum_name_shadows_builtin_type.out | 2 +- .../analyzer/errors/enum_native_bad_value.out | 2 +- .../enum_preload_unnamed_assign_to_named.out | 3 +- .../errors/enum_shadows_base_enum.out | 2 +- .../analyzer/errors/enum_string_value.out | 2 +- .../errors/enum_unnamed_assign_to_named.out | 3 +- ...xport_node_in_non_node_derived_class_1.out | 2 +- ...xport_node_in_non_node_derived_class_2.out | 2 +- ...xport_node_in_non_node_derived_class_3.out | 2 +- .../errors/extend_engine_singleton.out | 2 +- .../errors/extend_non_class_constant_1.out | 2 +- .../errors/extend_non_class_constant_2.out | 2 +- .../errors/extend_non_gdscript_nested.out | 2 +- .../analyzer/errors/extend_unknown.out | 2 +- .../analyzer/errors/extend_variable.out | 2 +- .../errors/for_loop_on_constant_float.out | 2 +- .../errors/for_loop_on_constant_int.out | 2 +- .../errors/for_loop_on_enum_value.out | 2 +- .../errors/for_loop_on_hard_float.out | 2 +- .../analyzer/errors/for_loop_on_hard_int.out | 2 +- .../errors/for_loop_on_hard_iterator.out | 2 +- .../errors/for_loop_on_hard_string.out | 2 +- .../errors/for_loop_on_literal_bool.out | 2 +- .../errors/for_loop_on_literal_int.out | 2 +- .../errors/for_loop_wrong_specified_type.out | 2 +- ...rong_specified_type_with_literal_array.out | 3 +- ...specified_type_with_literal_dictionary.out | 3 +- ..._parent_signature_parameter_count_less.out | 2 +- ..._parent_signature_parameter_count_more.out | 2 +- ...ent_signature_parameter_default_values.out | 2 +- ..._match_parent_signature_parameter_type.out | 2 +- ...ont_match_parent_signature_return_type.out | 2 +- ...on_param_type_invalid_contravariance_1.out | 2 +- ...on_param_type_invalid_contravariance_2.out | 2 +- ...on_param_type_invalid_contravariance_3.out | 2 +- ...ction_return_type_invalid_covariance_1.out | 2 +- ...ction_return_type_invalid_covariance_2.out | 2 +- ...ction_return_type_invalid_covariance_3.out | 2 +- ...ction_return_type_invalid_covariance_4.out | 2 +- .../errors/function_used_as_property.out | 2 +- .../errors/gd_utility_function_wrong_arg.out | 2 +- .../get_node_shorthand_in_static_function.out | 2 +- .../get_node_shorthand_within_non_node.out | 3 +- .../errors/incompatible_assignment.out | 2 +- ...nferring_with_weak_type_local_variable.out | 2 +- ...ferring_with_weak_type_member_variable.out | 2 +- .../inferring_with_weak_type_parameter.out | 2 +- .../analyzer/errors/invalid_array_index.out | 2 +- .../errors/invalid_concatenation_bool.out | 2 +- .../invalid_concatenation_dictionary.out | 2 +- .../errors/invalid_concatenation_mixed.out | 2 +- .../analyzer/errors/invalid_constant.out | 2 +- .../errors/lambda_cyclic_ref_call_arg.out | 3 +- .../errors/lambda_cyclic_ref_param.out | 3 +- .../analyzer/errors/lambda_no_return.out | 2 +- .../analyzer/errors/lambda_wrong_return.out | 3 +- .../errors/leading_number_separator.out | 2 +- ...ocal_const_as_type_use_before_declared.out | 2 +- .../local_const_as_type_use_not_const.out | 2 +- .../local_const_as_type_use_not_type.out | 2 +- .../errors/match_guard_invalid_expression.out | 2 +- .../analyzer/errors/match_with_subscript.out | 2 +- .../errors/match_with_variable_expression.out | 2 +- .../analyzer/errors/missing_argument.out | 2 +- .../analyzer/errors/native_freed_instance.gd | 7 -- .../analyzer/errors/native_freed_instance.out | 6 -- .../analyzer/errors/native_type_errors.out | 2 +- .../analyzer/errors/not_found_type.out | 2 +- .../errors/object_invalid_constructor.out | 2 +- .../errors/onready_within_non_node.out | 2 +- .../onready_within_non_node_inner_class.out | 2 +- .../analyzer/errors/outer_class_constants.gd | 8 -- .../analyzer/errors/outer_class_constants.out | 6 -- .../outer_class_constants_as_variant.gd | 9 -- .../outer_class_constants_as_variant.out | 6 -- .../errors/outer_class_instance_constants.gd | 8 -- .../errors/outer_class_instance_constants.out | 6 -- ...ter_class_instance_constants_as_variant.gd | 9 -- ...er_class_instance_constants_as_variant.out | 6 -- .../analyzer/errors/outer_class_lookup.out | 2 +- .../errors/overload_script_variable.out | 2 +- .../params_default_forward_reference.out | 3 +- .../analyzer/errors/preload_enum_error.out | 3 +- .../errors/prints_base_type_not_found.out | 2 +- .../property_function_get_type_error.out | 2 +- .../property_function_set_type_error.out | 2 +- .../errors/property_inline_get_type_error.out | 2 +- .../errors/property_inline_set_type_error.out | 2 +- .../errors/property_used_as_function.out | 3 +- .../errors/redefine_class_constant.out | 2 +- .../errors/redefine_local_constant.out | 2 +- .../errors/return_null_in_void_func.out | 2 +- .../errors/return_variant_in_void_func.out | 2 +- .../analyzer/errors/script_freed_instance.gd | 10 --- .../analyzer/errors/script_freed_instance.out | 6 -- .../setter_parameter_uses_property_type.out | 2 +- .../static_constructor_with_return_type.out | 2 +- .../errors/static_func_access_non_static.out | 2 +- ...func_access_non_static_in_lambda_param.out | 2 +- .../errors/static_func_call_non_static.out | 2 +- .../static_func_call_non_static_in_lambda.out | 2 +- ...c_func_call_non_static_in_lambda_param.out | 2 +- .../errors/static_var_export_annotation.out | 2 +- ...c_var_init_access_non_static_in_lambda.out | 2 +- ...nit_access_non_static_in_lambda_setter.out | 2 +- ...tic_var_init_call_non_static_in_lambda.out | 2 +- ..._init_call_non_static_in_lambda_setter.out | 2 +- .../static_var_init_non_static_access.out | 2 +- .../static_var_init_non_static_call.out | 2 +- .../errors/super_nonexistent_base_method.out | 2 +- .../analyzer/errors/ternary_weak_infer.out | 2 +- .../typed_array_assign_differently_typed.out | 2 +- .../errors/typed_array_assignment.out | 3 +- ...ray_init_with_unconvertable_in_literal.out | 2 +- .../typed_array_pass_differently_to_typed.out | 2 +- ...ed_dictionary_assign_differently_typed.out | 2 +- .../errors/typed_dictionary_assignment.out | 3 +- ...ary_init_with_unconvertible_in_literal.out | 2 +- ...d_dictionary_pass_differently_to_typed.out | 2 +- ..._value_of_void_function_builtin_method.out | 2 +- ...e_value_of_void_function_custom_method.out | 2 +- .../use_value_of_void_function_gd_utility.out | 2 +- ...e_value_of_void_function_native_method.out | 2 +- .../use_value_of_void_function_utility.out | 2 +- .../errors/utility_function_wrong_arg.out | 2 +- .../variable_name_shadows_builtin_type.out | 2 +- ...variable_overloads_superclass_function.out | 2 +- .../errors/virtual_super_not_implemented.out | 2 +- .../allow_void_function_to_return_void.out | 5 +- .../auto_inferred_type_dont_error.out | 5 +- .../features/warning_ignore_targets.out | 35 ++------ .../analyzer/warnings/cast_enum_bad_enum.out | 5 +- .../analyzer/warnings/cast_enum_bad_int.out | 5 +- .../confusable_capture_reassignment.out | 20 +---- .../warnings/confusable_local_declaration.out | 5 +- .../warnings/confusable_local_usage.out | 10 +-- .../confusable_local_usage_initializer.out | 15 +--- .../warnings/confusable_local_usage_loop.out | 10 +-- .../warnings/enum_without_default_value.out | 5 +- .../warnings/get_node_without_onready.out | 25 ++---- .../warnings/inference_with_variant.out | 5 +- .../warnings/lambda_shadowing_arg.out | 5 +- .../analyzer/warnings/lambda_unused_arg.out | 5 +- .../warnings/non_tool_extends_tool.out | 10 +-- .../analyzer/warnings/onready_with_export.out | 5 +- .../warnings/overriding_native_method.out | 5 +- .../analyzer/warnings/redundant_await.out | 45 ++-------- .../scripts/analyzer/warnings/shadowning.out | 55 +++--------- .../warnings/unsafe_call_argument.out | 70 +++------------ .../scripts/analyzer/warnings/unsafe_cast.out | 40 ++------- .../unused_private_class_variable.out | 10 +-- .../analyzer/warnings/unused_signal.out | 10 +-- .../errors/export_enum_wrong_array_type.out | 2 +- .../parser/errors/export_enum_wrong_type.out | 2 +- .../export_tool_button_requires_tool_mode.out | 2 +- .../parser/features/match_bind_unused.out | 5 +- .../parser/features/nested_arithmetic.out | 85 ++++--------------- .../parser/warnings/assert_always_true.out | 15 +--- .../parser/warnings/confusable_identifier.out | 10 +-- ...pty_file.notest.gd => empty_file.norun.gd} | 0 .../parser/warnings/empty_file.norun.out | 2 + .../parser/warnings/empty_file.notest.out | 4 - .../warnings/empty_file_comment.norun.gd | 1 + .../warnings/empty_file_comment.norun.out | 2 + .../warnings/empty_file_comment.notest.gd | 1 - .../warnings/empty_file_comment.notest.out | 4 - ....notest.gd => empty_file_newline.norun.gd} | 0 .../warnings/empty_file_newline.norun.out | 2 + .../warnings/empty_file_newline.notest.out | 4 - .../empty_file_newline_comment.norun.gd | 4 + .../empty_file_newline_comment.norun.out | 2 + .../empty_file_newline_comment.notest.gd | 4 - .../empty_file_newline_comment.notest.out | 4 - .../enum_assign_int_without_casting.out | 20 +---- .../parser/warnings/incompatible_ternary.out | 5 +- .../parser/warnings/integer_division.out | 5 +- .../warnings/match_default_not_at_end.out | 5 +- .../parser/warnings/narrowing_conversion.out | 5 +- .../warnings/return_value_discarded.out | 10 +-- .../parser/warnings/shadowed_constant.out | 10 +-- .../warnings/shadowed_global_identifier.out | 10 +-- .../warnings/shadowed_variable_class.out | 10 +-- .../warnings/shadowed_variable_function.out | 10 +-- .../parser/warnings/standalone_expression.out | 20 +---- .../parser/warnings/standalone_ternary.out | 10 +-- .../warnings/static_called_on_instance.out | 15 +--- .../parser/warnings/unassigned_variable.out | 15 +--- .../unassigned_variable_op_assign.out | 5 +- .../unreachable_code_after_return.out | 5 +- .../parser/warnings/unused_argument.out | 5 +- .../parser/warnings/unused_constant.out | 5 +- .../parser/warnings/unused_variable.out | 5 +- .../runtime/assign_to_read_only_property.gd | 7 -- .../runtime/assign_to_read_only_property.out | 6 -- ..._read_only_property_with_variable_index.gd | 8 -- ...read_only_property_with_variable_index.out | 6 -- .../runtime/errors/assign_freed_instance.gd | 22 +++++ .../runtime/errors/assign_freed_instance.out | 3 + .../errors/assign_to_read_only_property.gd | 11 +++ .../errors/assign_to_read_only_property.out | 6 ++ .../bad_conversion_for_default_parameter.out | 6 +- .../callable_call_after_free_object.out | 6 +- .../runtime/errors/cast_freed_object.out | 6 +- .../runtime/errors/cast_int_to_array.out | 6 +- .../runtime/errors/cast_int_to_object.out | 6 +- .../runtime/errors/cast_object_to_int.out | 6 +- .../runtime/errors/constant_array_is_deep.out | 8 +- .../errors/constant_dictionary_is_deep.out | 6 +- ...loop_iterator_type_not_match_specified.out | 6 +- .../errors/gd_utility_function_wrong_arg.out | 6 +- .../errors/invalid_property_assignment.out | 6 +- ...non_static_method_call_on_native_class.out | 7 +- .../runtime/errors/outer_class_constants.gd | 28 ++++++ .../runtime/errors/outer_class_constants.out | 7 ++ .../runtime/errors/read_only_dictionary.out | 8 +- .../typed_array_assign_basic_to_typed.gd | 2 +- .../typed_array_assign_basic_to_typed.out | 6 +- .../typed_array_assign_differently_typed.gd | 2 +- .../typed_array_assign_differently_typed.out | 6 +- .../typed_array_assign_wrong_to_typed.gd | 2 +- .../typed_array_assign_wrong_to_typed.out | 7 +- .../typed_array_pass_basic_to_typed.out | 6 +- .../typed_array_pass_differently_to_typed.out | 7 +- .../typed_dictionary_assign_basic_to_typed.gd | 2 +- ...typed_dictionary_assign_basic_to_typed.out | 6 +- ...ped_dictionary_assign_differently_typed.gd | 2 +- ...ed_dictionary_assign_differently_typed.out | 6 +- ...ictionary_assign_differently_typed_key.out | 9 +- ...tionary_assign_differently_typed_value.out | 9 +- .../typed_dictionary_assign_wrong_to_typed.gd | 2 +- ...typed_dictionary_assign_wrong_to_typed.out | 7 +- .../typed_dictionary_pass_basic_to_typed.out | 6 +- ...d_dictionary_pass_differently_to_typed.out | 7 +- .../errors/use_return_value_of_free_call.out | 7 +- ...turn_value_of_void_builtin_method_call.out | 7 +- ...eturn_value_of_void_native_method_call.out | 7 +- .../errors/utility_function_wrong_arg.out | 6 +- .../features/await_without_coroutine.out | 5 +- .../runtime/features/parameter_shadowing.out | 10 +-- .../runtime/features/typed_assignment.out | 10 +-- 294 files changed, 540 insertions(+), 1084 deletions(-) delete mode 100644 modules/gdscript/tests/scripts/analyzer/errors/abstract_script_instantiate.gd delete mode 100644 modules/gdscript/tests/scripts/analyzer/errors/abstract_script_instantiate.out delete mode 100644 modules/gdscript/tests/scripts/analyzer/errors/native_freed_instance.gd delete mode 100644 modules/gdscript/tests/scripts/analyzer/errors/native_freed_instance.out delete mode 100644 modules/gdscript/tests/scripts/analyzer/errors/outer_class_constants.gd delete mode 100644 modules/gdscript/tests/scripts/analyzer/errors/outer_class_constants.out delete mode 100644 modules/gdscript/tests/scripts/analyzer/errors/outer_class_constants_as_variant.gd delete mode 100644 modules/gdscript/tests/scripts/analyzer/errors/outer_class_constants_as_variant.out delete mode 100644 modules/gdscript/tests/scripts/analyzer/errors/outer_class_instance_constants.gd delete mode 100644 modules/gdscript/tests/scripts/analyzer/errors/outer_class_instance_constants.out delete mode 100644 modules/gdscript/tests/scripts/analyzer/errors/outer_class_instance_constants_as_variant.gd delete mode 100644 modules/gdscript/tests/scripts/analyzer/errors/outer_class_instance_constants_as_variant.out delete mode 100644 modules/gdscript/tests/scripts/analyzer/errors/script_freed_instance.gd delete mode 100644 modules/gdscript/tests/scripts/analyzer/errors/script_freed_instance.out rename modules/gdscript/tests/scripts/parser/warnings/{empty_file.notest.gd => empty_file.norun.gd} (100%) create mode 100644 modules/gdscript/tests/scripts/parser/warnings/empty_file.norun.out delete mode 100644 modules/gdscript/tests/scripts/parser/warnings/empty_file.notest.out create mode 100644 modules/gdscript/tests/scripts/parser/warnings/empty_file_comment.norun.gd create mode 100644 modules/gdscript/tests/scripts/parser/warnings/empty_file_comment.norun.out delete mode 100644 modules/gdscript/tests/scripts/parser/warnings/empty_file_comment.notest.gd delete mode 100644 modules/gdscript/tests/scripts/parser/warnings/empty_file_comment.notest.out rename modules/gdscript/tests/scripts/parser/warnings/{empty_file_newline.notest.gd => empty_file_newline.norun.gd} (100%) create mode 100644 modules/gdscript/tests/scripts/parser/warnings/empty_file_newline.norun.out delete mode 100644 modules/gdscript/tests/scripts/parser/warnings/empty_file_newline.notest.out create mode 100644 modules/gdscript/tests/scripts/parser/warnings/empty_file_newline_comment.norun.gd create mode 100644 modules/gdscript/tests/scripts/parser/warnings/empty_file_newline_comment.norun.out delete mode 100644 modules/gdscript/tests/scripts/parser/warnings/empty_file_newline_comment.notest.gd delete mode 100644 modules/gdscript/tests/scripts/parser/warnings/empty_file_newline_comment.notest.out delete mode 100644 modules/gdscript/tests/scripts/runtime/assign_to_read_only_property.gd delete mode 100644 modules/gdscript/tests/scripts/runtime/assign_to_read_only_property.out delete mode 100644 modules/gdscript/tests/scripts/runtime/assign_to_read_only_property_with_variable_index.gd delete mode 100644 modules/gdscript/tests/scripts/runtime/assign_to_read_only_property_with_variable_index.out create mode 100644 modules/gdscript/tests/scripts/runtime/errors/assign_freed_instance.gd create mode 100644 modules/gdscript/tests/scripts/runtime/errors/assign_freed_instance.out create mode 100644 modules/gdscript/tests/scripts/runtime/errors/assign_to_read_only_property.gd create mode 100644 modules/gdscript/tests/scripts/runtime/errors/assign_to_read_only_property.out create mode 100644 modules/gdscript/tests/scripts/runtime/errors/outer_class_constants.gd create mode 100644 modules/gdscript/tests/scripts/runtime/errors/outer_class_constants.out diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 2fa0493544b..bd6eddf2fc0 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -184,8 +184,8 @@ repos: .*\.patch$| .*\.out$| modules/gdscript/tests/scripts/parser/features/mixed_indentation_on_blank_lines\.gd$| - modules/gdscript/tests/scripts/parser/warnings/empty_file_newline_comment\.notest\.gd$| - modules/gdscript/tests/scripts/parser/warnings/empty_file_newline\.notest\.gd$| + modules/gdscript/tests/scripts/parser/warnings/empty_file_newline_comment\.norun\.gd$| + modules/gdscript/tests/scripts/parser/warnings/empty_file_newline\.norun\.gd$| platform/android/java/editor/src/main/java/com/android/.*| platform/android/java/lib/src/com/google/.* ) diff --git a/modules/gdscript/tests/gdscript_test_runner.cpp b/modules/gdscript/tests/gdscript_test_runner.cpp index 025fcbd32a3..aded628e271 100644 --- a/modules/gdscript/tests/gdscript_test_runner.cpp +++ b/modules/gdscript/tests/gdscript_test_runner.cpp @@ -176,7 +176,7 @@ static String strip_warnings(const String &p_expected) { // so it doesn't fail just because of difference in warnings. String expected_no_warnings; for (String line : p_expected.split("\n")) { - if (line.begins_with(">> ")) { + if (line.begins_with("~~ ")) { continue; } expected_no_warnings += line + "\n"; @@ -275,6 +275,7 @@ bool GDScriptTestRunner::make_tests_for_dir(const String &p_dir) { return false; } } else { + // `*.notest.gd` files are skipped. if (next.ends_with(".notest.gd")) { next = dir->get_next(); continue; @@ -450,47 +451,43 @@ void GDScriptTest::error_handler(void *p_this, const char *p_function, const cha result->status = GDTEST_RUNTIME_ERROR; - StringBuilder builder; - builder.append(">> "); - // Only include the function, file and line for script errors, otherwise the - // test outputs changes based on the platform/compiler. + // Only include the file, line, and function for script errors, + // otherwise the test outputs changes based on the platform/compiler. + String header; bool include_source_info = false; switch (p_type) { case ERR_HANDLER_ERROR: - builder.append("ERROR"); + header = "ERROR"; break; case ERR_HANDLER_WARNING: - builder.append("WARNING"); + header = "WARNING"; break; case ERR_HANDLER_SCRIPT: - builder.append("SCRIPT ERROR"); + header = "SCRIPT ERROR"; include_source_info = true; break; case ERR_HANDLER_SHADER: - builder.append("SHADER ERROR"); + header = "SHADER ERROR"; break; default: - builder.append("Unknown error type"); + header = "UNKNOWN ERROR"; break; } if (include_source_info) { - builder.append("\n>> on function: "); - builder.append(String::utf8(p_function)); - builder.append("()\n>> "); - builder.append(String::utf8(p_file).trim_prefix(self->base_dir).replace("\\", "/")); - builder.append("\n>> "); - builder.append(itos(p_line)); + header += vformat(" at %s:%d on %s()", + String::utf8(p_file).trim_prefix(self->base_dir).replace("\\", "/"), + p_line, + String::utf8(p_function)); } - builder.append("\n>> "); - builder.append(String::utf8(p_error)); - if (strlen(p_explanation) > 0) { - builder.append("\n>> "); - builder.append(String::utf8(p_explanation)); - } - builder.append("\n"); - result->output = builder.as_string(); + StringBuilder error_string; + error_string.append(vformat(">> %s: %s\n", header, String::utf8(p_error))); + if (strlen(p_explanation) > 0) { + error_string.append(vformat(">> %s\n", String::utf8(p_explanation))); + } + + result->output += error_string.as_string(); } bool GDScriptTest::check_output(const String &p_output) const { @@ -588,11 +585,11 @@ GDScriptTest::TestResult GDScriptTest::execute_test_code(bool p_is_generating) { result.status = GDTEST_ANALYZER_ERROR; result.output = get_text_for_status(result.status) + "\n"; - const List &errors = parser.get_errors(); - if (!errors.is_empty()) { - // Only the first error since the following might be cascading. - result.output += errors.front()->get().message + "\n"; // TODO: line, column? + StringBuilder error_string; + for (const GDScriptParser::ParserError &error : parser.get_errors()) { + error_string.append(vformat(">> ERROR at line %d: %s\n", error.line, error.message)); } + result.output += error_string.as_string(); if (!p_is_generating) { result.passed = check_output(result.output); } @@ -601,16 +598,8 @@ GDScriptTest::TestResult GDScriptTest::execute_test_code(bool p_is_generating) { #ifdef DEBUG_ENABLED StringBuilder warning_string; - for (const GDScriptWarning &E : parser.get_warnings()) { - const GDScriptWarning warning = E; - warning_string.append(">> WARNING"); - warning_string.append("\n>> Line: "); - warning_string.append(itos(warning.start_line)); - warning_string.append("\n>> "); - warning_string.append(warning.get_name()); - warning_string.append("\n>> "); - warning_string.append(warning.get_message()); - warning_string.append("\n"); + for (const GDScriptWarning &warning : parser.get_warnings()) { + warning_string.append(vformat("~~ WARNING at line %d: (%s) %s\n", warning.start_line, warning.get_name(), warning.get_message())); } result.output += warning_string.as_string(); #endif @@ -628,12 +617,18 @@ GDScriptTest::TestResult GDScriptTest::execute_test_code(bool p_is_generating) { } return result; } - // Script files matching this pattern are allowed to not contain a test() function. - if (source_file.match("*.notest.gd")) { + + // `*.norun.gd` files are allowed to not contain a `test()` function (no runtime testing). + if (source_file.ends_with(".norun.gd")) { enable_stdout(); - result.passed = check_output(result.output); + result.status = GDTEST_OK; + result.output = get_text_for_status(result.status) + "\n" + result.output; + if (!p_is_generating) { + result.passed = check_output(result.output); + } return result; } + // Test running. const HashMap::ConstIterator test_function_element = script->get_member_functions().find(GDScriptTestRunner::test_function_name); if (!test_function_element) { diff --git a/modules/gdscript/tests/scripts/.editorconfig b/modules/gdscript/tests/scripts/.editorconfig index 34fff8d1deb..3a877f36f09 100644 --- a/modules/gdscript/tests/scripts/.editorconfig +++ b/modules/gdscript/tests/scripts/.editorconfig @@ -1,10 +1,11 @@ # Some tests handle invalid syntax deliberately; exclude relevant attributes. +# See also the `file-format` section in `.pre-commit-config.yaml`. [parser/features/mixed_indentation_on_blank_lines.gd] trim_trailing_whitespace = false -[parser/warnings/empty_file_newline.notest.gd] +[parser/warnings/empty_file_newline.norun.gd] insert_final_newline = false -[parser/warnings/empty_file_newline_comment.notest.gd] +[parser/warnings/empty_file_newline_comment.norun.gd] insert_final_newline = false diff --git a/modules/gdscript/tests/scripts/analyzer/errors/abstract_class_instantiate.gd b/modules/gdscript/tests/scripts/analyzer/errors/abstract_class_instantiate.gd index 8709b89b54d..afb4b332ab0 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/abstract_class_instantiate.gd +++ b/modules/gdscript/tests/scripts/analyzer/errors/abstract_class_instantiate.gd @@ -1,2 +1,10 @@ +class A extends InstancePlaceholder: + func _init(): + print('no') + +class B extends A: + pass + func test(): InstancePlaceholder.new() + B.new() diff --git a/modules/gdscript/tests/scripts/analyzer/errors/abstract_class_instantiate.out b/modules/gdscript/tests/scripts/analyzer/errors/abstract_class_instantiate.out index 36224c6b6f4..29200fd76c4 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/abstract_class_instantiate.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/abstract_class_instantiate.out @@ -1,2 +1,5 @@ GDTEST_ANALYZER_ERROR -Native class "InstancePlaceholder" cannot be constructed as it is abstract. +>> ERROR at line 9: Native class "InstancePlaceholder" cannot be constructed as it is abstract. +>> ERROR at line 9: Name "new" is a Callable. You can call it with "new.call()" instead. +>> ERROR at line 10: Class "abstract_class_instantiate.gd::B" cannot be constructed as it is based on abstract native class "InstancePlaceholder". +>> ERROR at line 10: Name "new" is a Callable. You can call it with "new.call()" instead. diff --git a/modules/gdscript/tests/scripts/analyzer/errors/abstract_script_instantiate.gd b/modules/gdscript/tests/scripts/analyzer/errors/abstract_script_instantiate.gd deleted file mode 100644 index be67182efb0..00000000000 --- a/modules/gdscript/tests/scripts/analyzer/errors/abstract_script_instantiate.gd +++ /dev/null @@ -1,9 +0,0 @@ -class A extends InstancePlaceholder: - func _init(): - print('no') - -class B extends A: - pass - -func test(): - B.new() diff --git a/modules/gdscript/tests/scripts/analyzer/errors/abstract_script_instantiate.out b/modules/gdscript/tests/scripts/analyzer/errors/abstract_script_instantiate.out deleted file mode 100644 index 260f0625550..00000000000 --- a/modules/gdscript/tests/scripts/analyzer/errors/abstract_script_instantiate.out +++ /dev/null @@ -1,2 +0,0 @@ -GDTEST_ANALYZER_ERROR -Class "abstract_script_instantiate.gd::B" cannot be constructed as it is based on abstract native class "InstancePlaceholder". diff --git a/modules/gdscript/tests/scripts/analyzer/errors/annotation_non_constant_parameter.out b/modules/gdscript/tests/scripts/analyzer/errors/annotation_non_constant_parameter.out index b4f0e79237b..e681391ffd5 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/annotation_non_constant_parameter.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/annotation_non_constant_parameter.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Argument 1 of annotation "@export_range" isn't a constant expression. +>> ERROR at line 3: Argument 1 of annotation "@export_range" isn't a constant expression. diff --git a/modules/gdscript/tests/scripts/analyzer/errors/assign_enum.out b/modules/gdscript/tests/scripts/analyzer/errors/assign_enum.out index 5275183da27..bbebbe62395 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/assign_enum.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/assign_enum.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Cannot assign a new value to a constant. +>> ERROR at line 3: Cannot assign a new value to a constant. diff --git a/modules/gdscript/tests/scripts/analyzer/errors/assign_named_enum.out b/modules/gdscript/tests/scripts/analyzer/errors/assign_named_enum.out index 5275183da27..bbebbe62395 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/assign_named_enum.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/assign_named_enum.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Cannot assign a new value to a constant. +>> ERROR at line 3: Cannot assign a new value to a constant. diff --git a/modules/gdscript/tests/scripts/analyzer/errors/assign_signal.out b/modules/gdscript/tests/scripts/analyzer/errors/assign_signal.out index 5275183da27..876cad671e9 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/assign_signal.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/assign_signal.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Cannot assign a new value to a constant. +>> ERROR at line 4: Cannot assign a new value to a constant. diff --git a/modules/gdscript/tests/scripts/analyzer/errors/assign_to_read_only_property.out b/modules/gdscript/tests/scripts/analyzer/errors/assign_to_read_only_property.out index b236d70ec80..1d3858f251b 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/assign_to_read_only_property.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/assign_to_read_only_property.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Cannot assign a new value to a read-only property. +>> ERROR at line 3: Cannot assign a new value to a read-only property. diff --git a/modules/gdscript/tests/scripts/analyzer/errors/assign_to_read_only_property_indirectly.out b/modules/gdscript/tests/scripts/analyzer/errors/assign_to_read_only_property_indirectly.out index b236d70ec80..1d3858f251b 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/assign_to_read_only_property_indirectly.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/assign_to_read_only_property_indirectly.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Cannot assign a new value to a read-only property. +>> ERROR at line 3: Cannot assign a new value to a read-only property. diff --git a/modules/gdscript/tests/scripts/analyzer/errors/assymetric_assignment_bad.out b/modules/gdscript/tests/scripts/analyzer/errors/assymetric_assignment_bad.out index cc4b1d86bfd..97c39e59771 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/assymetric_assignment_bad.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/assymetric_assignment_bad.out @@ -1,2 +1,3 @@ GDTEST_ANALYZER_ERROR -Cannot assign a value of type "Color" as "String". +>> ERROR at line 2: Cannot assign a value of type "Color" as "String". +>> ERROR at line 2: Cannot assign a value of type Color to variable "var_color" with specified type String. diff --git a/modules/gdscript/tests/scripts/analyzer/errors/await_signal_no_infer.out b/modules/gdscript/tests/scripts/analyzer/errors/await_signal_no_infer.out index 8f8744ad7e8..2bb6b5bfa6c 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/await_signal_no_infer.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/await_signal_no_infer.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Cannot infer the type of "_a" variable because the value doesn't have a set type. +>> ERROR at line 4: Cannot infer the type of "_a" variable because the value doesn't have a set type. diff --git a/modules/gdscript/tests/scripts/analyzer/errors/bitwise_float_left_operand.out b/modules/gdscript/tests/scripts/analyzer/errors/bitwise_float_left_operand.out index 7dee854d1a1..ec4f6568fe7 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/bitwise_float_left_operand.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/bitwise_float_left_operand.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Invalid operands to operator <<, float and int. +>> ERROR at line 3: Invalid operands to operator <<, float and int. diff --git a/modules/gdscript/tests/scripts/analyzer/errors/bitwise_float_right_operand.out b/modules/gdscript/tests/scripts/analyzer/errors/bitwise_float_right_operand.out index 1edbf47ec0a..70a56196f82 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/bitwise_float_right_operand.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/bitwise_float_right_operand.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Invalid operands to operator >>, int and float. +>> ERROR at line 3: Invalid operands to operator >>, int and float. diff --git a/modules/gdscript/tests/scripts/analyzer/errors/call_not_existing_static_method.out b/modules/gdscript/tests/scripts/analyzer/errors/call_not_existing_static_method.out index 7340058dd45..adfe41bc14f 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/call_not_existing_static_method.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/call_not_existing_static_method.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Static function "not_existing_method()" not found in base "MyClass". +>> ERROR at line 7: Static function "not_existing_method()" not found in base "MyClass". diff --git a/modules/gdscript/tests/scripts/analyzer/errors/cast_int_to_array.out b/modules/gdscript/tests/scripts/analyzer/errors/cast_int_to_array.out index e3e82c2b7e1..203fa04e499 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/cast_int_to_array.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/cast_int_to_array.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Invalid cast. Cannot convert from "int" to "Array". +>> ERROR at line 3: Invalid cast. Cannot convert from "int" to "Array". diff --git a/modules/gdscript/tests/scripts/analyzer/errors/cast_int_to_object.out b/modules/gdscript/tests/scripts/analyzer/errors/cast_int_to_object.out index 7de40418bf0..0dd12f1f0f0 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/cast_int_to_object.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/cast_int_to_object.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Invalid cast. Cannot convert from "int" to "Node". +>> ERROR at line 3: Invalid cast. Cannot convert from "int" to "Node". diff --git a/modules/gdscript/tests/scripts/analyzer/errors/cast_object_to_int.out b/modules/gdscript/tests/scripts/analyzer/errors/cast_object_to_int.out index 8af0847577a..0cfefc20af2 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/cast_object_to_int.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/cast_object_to_int.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Invalid cast. Cannot convert from "RefCounted" to "int". +>> ERROR at line 3: Invalid cast. Cannot convert from "RefCounted" to "int". diff --git a/modules/gdscript/tests/scripts/analyzer/errors/class_name_shadows_builtin_type.out b/modules/gdscript/tests/scripts/analyzer/errors/class_name_shadows_builtin_type.out index b9a1d301ad0..24e9714d857 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/class_name_shadows_builtin_type.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/class_name_shadows_builtin_type.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Class "Vector2" hides a built-in type. +>> ERROR at line 1: Class "Vector2" hides a built-in type. diff --git a/modules/gdscript/tests/scripts/analyzer/errors/constant_array_index_assign.out b/modules/gdscript/tests/scripts/analyzer/errors/constant_array_index_assign.out index 5275183da27..134de681110 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/constant_array_index_assign.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/constant_array_index_assign.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Cannot assign a new value to a constant. +>> ERROR at line 5: Cannot assign a new value to a constant. diff --git a/modules/gdscript/tests/scripts/analyzer/errors/constant_dictionary_index_assign.out b/modules/gdscript/tests/scripts/analyzer/errors/constant_dictionary_index_assign.out index 5275183da27..134de681110 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/constant_dictionary_index_assign.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/constant_dictionary_index_assign.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Cannot assign a new value to a constant. +>> ERROR at line 5: Cannot assign a new value to a constant. diff --git a/modules/gdscript/tests/scripts/analyzer/errors/constant_name_shadows_builtin_type.out b/modules/gdscript/tests/scripts/analyzer/errors/constant_name_shadows_builtin_type.out index 87863baf758..ce8d9807b2f 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/constant_name_shadows_builtin_type.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/constant_name_shadows_builtin_type.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -The member "Vector2" cannot have the same name as a builtin type. +>> ERROR at line 1: The member "Vector2" cannot have the same name as a builtin type. diff --git a/modules/gdscript/tests/scripts/analyzer/errors/constant_subscript_type.out b/modules/gdscript/tests/scripts/analyzer/errors/constant_subscript_type.out index 54c190cf8a1..c42bb0f974a 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/constant_subscript_type.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/constant_subscript_type.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Expression is of type "int" so it can't be of type "String". +>> ERROR at line 5: Expression is of type "int" so it can't be of type "String". diff --git a/modules/gdscript/tests/scripts/analyzer/errors/constant_used_as_function.out b/modules/gdscript/tests/scripts/analyzer/errors/constant_used_as_function.out index f4051cd02c7..dc28ae46be4 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/constant_used_as_function.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/constant_used_as_function.out @@ -1,2 +1,3 @@ GDTEST_ANALYZER_ERROR -Member "CONSTANT" is not a function. +>> ERROR at line 5: Member "CONSTANT" is not a function. +>> ERROR at line 5: Name "CONSTANT" called as a function but is a "int". diff --git a/modules/gdscript/tests/scripts/analyzer/errors/constructor_call_type.out b/modules/gdscript/tests/scripts/analyzer/errors/constructor_call_type.out index 91d5125ec01..467a2243bed 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/constructor_call_type.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/constructor_call_type.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Expression is of type "B" so it can't be of type "C". +>> ERROR at line 10: Expression is of type "B" so it can't be of type "C". diff --git a/modules/gdscript/tests/scripts/analyzer/errors/cyclic_inheritance.out b/modules/gdscript/tests/scripts/analyzer/errors/cyclic_inheritance.out index 75a94baa176..c095f679087 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/cyclic_inheritance.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/cyclic_inheritance.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Cyclic inheritance. +>> ERROR at line 4: Cyclic inheritance. diff --git a/modules/gdscript/tests/scripts/analyzer/errors/cyclic_ref_const.out b/modules/gdscript/tests/scripts/analyzer/errors/cyclic_ref_const.out index e71b3fc56ac..30f0669dbf5 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/cyclic_ref_const.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/cyclic_ref_const.out @@ -1,2 +1,3 @@ GDTEST_ANALYZER_ERROR -Could not resolve member "c1": Cyclic reference. +>> ERROR at line 5: Could not resolve member "c1": Cyclic reference. +>> ERROR at line 5: Could not resolve type for constant "c2". diff --git a/modules/gdscript/tests/scripts/analyzer/errors/cyclic_ref_enum.out b/modules/gdscript/tests/scripts/analyzer/errors/cyclic_ref_enum.out index 1b6569ba3ab..2d59de75aa8 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/cyclic_ref_enum.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/cyclic_ref_enum.out @@ -1,2 +1,3 @@ GDTEST_ANALYZER_ERROR -Could not resolve member "E1": Cyclic reference. +>> ERROR at line 5: Could not resolve member "E1": Cyclic reference. +>> ERROR at line 5: Enum values must be constant. diff --git a/modules/gdscript/tests/scripts/analyzer/errors/cyclic_ref_enum_value.out b/modules/gdscript/tests/scripts/analyzer/errors/cyclic_ref_enum_value.out index 233f5fee256..62285ab56f4 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/cyclic_ref_enum_value.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/cyclic_ref_enum_value.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Could not resolve member "EV1": Cyclic reference. +>> ERROR at line 5: Could not resolve member "EV1": Cyclic reference. diff --git a/modules/gdscript/tests/scripts/analyzer/errors/cyclic_ref_external.out b/modules/gdscript/tests/scripts/analyzer/errors/cyclic_ref_external.out index 878e827d043..80026731fd1 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/cyclic_ref_external.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/cyclic_ref_external.out @@ -1,2 +1,3 @@ GDTEST_ANALYZER_ERROR -Could not resolve external class member "v". +>> ERROR at line 4: Could not resolve external class member "v". +>> ERROR at line 4: Cannot find member "v" in base "TestCyclicRefExternalA". diff --git a/modules/gdscript/tests/scripts/analyzer/errors/cyclic_ref_external_a.notest.gd b/modules/gdscript/tests/scripts/analyzer/errors/cyclic_ref_external_a.notest.gd index 9ef17692506..db6392e416b 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/cyclic_ref_external_a.notest.gd +++ b/modules/gdscript/tests/scripts/analyzer/errors/cyclic_ref_external_a.notest.gd @@ -1,3 +1,5 @@ +class_name TestCyclicRefExternalA + const B = preload("cyclic_ref_external.gd") var v = B.v diff --git a/modules/gdscript/tests/scripts/analyzer/errors/cyclic_ref_func.out b/modules/gdscript/tests/scripts/analyzer/errors/cyclic_ref_func.out index d3ec4b06924..f060be9d9a7 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/cyclic_ref_func.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/cyclic_ref_func.out @@ -1,2 +1,3 @@ GDTEST_ANALYZER_ERROR -Could not resolve member "f1": Cyclic reference. +>> ERROR at line 8: Could not resolve member "f1": Cyclic reference. +>> ERROR at line 8: Cannot infer the type of "p" parameter because the value doesn't have a set type. diff --git a/modules/gdscript/tests/scripts/analyzer/errors/cyclic_ref_override.out b/modules/gdscript/tests/scripts/analyzer/errors/cyclic_ref_override.out index 6bca25b3306..5f1b608a367 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/cyclic_ref_override.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/cyclic_ref_override.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Could not resolve member "f": Cyclic reference. +>> ERROR at line 11: Could not resolve member "f": Cyclic reference. diff --git a/modules/gdscript/tests/scripts/analyzer/errors/cyclic_ref_var.out b/modules/gdscript/tests/scripts/analyzer/errors/cyclic_ref_var.out index c337882d9c3..f29946bca7b 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/cyclic_ref_var.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/cyclic_ref_var.out @@ -1,2 +1,3 @@ GDTEST_ANALYZER_ERROR -Could not resolve member "v1": Cyclic reference. +>> ERROR at line 5: Could not resolve member "v1": Cyclic reference. +>> ERROR at line 5: Cannot infer the type of "v2" variable because the value doesn't have a set type. diff --git a/modules/gdscript/tests/scripts/analyzer/errors/cyclic_ref_var_self.out b/modules/gdscript/tests/scripts/analyzer/errors/cyclic_ref_var_self.out index c337882d9c3..77d3f3f2aa7 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/cyclic_ref_var_self.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/cyclic_ref_var_self.out @@ -1,2 +1,3 @@ GDTEST_ANALYZER_ERROR -Could not resolve member "v1": Cyclic reference. +>> ERROR at line 1: Could not resolve member "v1": Cyclic reference. +>> ERROR at line 1: Could not resolve type for variable "v1". diff --git a/modules/gdscript/tests/scripts/analyzer/errors/dictionary_duplicate_key_lua.out b/modules/gdscript/tests/scripts/analyzer/errors/dictionary_duplicate_key_lua.out index ffdfa56645d..bc03a633c29 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/dictionary_duplicate_key_lua.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/dictionary_duplicate_key_lua.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Key "a" was already used in this dictionary (at line 3). +>> ERROR at line 5: Key "a" was already used in this dictionary (at line 3). diff --git a/modules/gdscript/tests/scripts/analyzer/errors/dictionary_duplicate_key_lua_with_string.out b/modules/gdscript/tests/scripts/analyzer/errors/dictionary_duplicate_key_lua_with_string.out index ffdfa56645d..bc03a633c29 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/dictionary_duplicate_key_lua_with_string.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/dictionary_duplicate_key_lua_with_string.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Key "a" was already used in this dictionary (at line 3). +>> ERROR at line 5: Key "a" was already used in this dictionary (at line 3). diff --git a/modules/gdscript/tests/scripts/analyzer/errors/dictionary_duplicate_key_python.out b/modules/gdscript/tests/scripts/analyzer/errors/dictionary_duplicate_key_python.out index ffdfa56645d..bc03a633c29 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/dictionary_duplicate_key_python.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/dictionary_duplicate_key_python.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Key "a" was already used in this dictionary (at line 3). +>> ERROR at line 5: Key "a" was already used in this dictionary (at line 3). diff --git a/modules/gdscript/tests/scripts/analyzer/errors/dictionary_string_stringname_equivalent.out b/modules/gdscript/tests/scripts/analyzer/errors/dictionary_string_stringname_equivalent.out index 189d8a79558..ea6a00b2402 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/dictionary_string_stringname_equivalent.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/dictionary_string_stringname_equivalent.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Key "key" was already used in this dictionary (at line 5). +>> ERROR at line 6: Key "key" was already used in this dictionary (at line 5). diff --git a/modules/gdscript/tests/scripts/analyzer/errors/engine_singleton_instantiate.out b/modules/gdscript/tests/scripts/analyzer/errors/engine_singleton_instantiate.out index bc4875d908f..95b4e15aa7b 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/engine_singleton_instantiate.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/engine_singleton_instantiate.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Cannot construct native class "Time" because it is an engine singleton. +>> ERROR at line 2: Cannot construct native class "Time" because it is an engine singleton. diff --git a/modules/gdscript/tests/scripts/analyzer/errors/enum_bad_method.out b/modules/gdscript/tests/scripts/analyzer/errors/enum_bad_method.out index 9ca86eca9cc..d7c603b86de 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/enum_bad_method.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/enum_bad_method.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Cannot call non-const Dictionary function "clear()" on enum "Enum". +>> ERROR at line 4: Cannot call non-const Dictionary function "clear()" on enum "Enum". diff --git a/modules/gdscript/tests/scripts/analyzer/errors/enum_bad_value.out b/modules/gdscript/tests/scripts/analyzer/errors/enum_bad_value.out index 1b6e11f6f2f..a2196871f01 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/enum_bad_value.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/enum_bad_value.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Cannot find member "V3" in base "enum_bad_value.gd.Enum". +>> ERROR at line 4: Cannot find member "V3" in base "enum_bad_value.gd.Enum". diff --git a/modules/gdscript/tests/scripts/analyzer/errors/enum_class_var_assign_with_wrong_enum_type.out b/modules/gdscript/tests/scripts/analyzer/errors/enum_class_var_assign_with_wrong_enum_type.out index d401675bcfa..cddb9a40f16 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/enum_class_var_assign_with_wrong_enum_type.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/enum_class_var_assign_with_wrong_enum_type.out @@ -1,2 +1,3 @@ GDTEST_ANALYZER_ERROR -Cannot assign a value of type "enum_class_var_assign_with_wrong_enum_type.gd.MyOtherEnum" as "enum_class_var_assign_with_wrong_enum_type.gd.MyEnum". +>> ERROR at line 9: Cannot assign a value of type "enum_class_var_assign_with_wrong_enum_type.gd.MyOtherEnum" as "enum_class_var_assign_with_wrong_enum_type.gd.MyEnum". +>> ERROR at line 9: Value of type "enum_class_var_assign_with_wrong_enum_type.gd.MyOtherEnum" cannot be assigned to a variable of type "enum_class_var_assign_with_wrong_enum_type.gd.MyEnum". diff --git a/modules/gdscript/tests/scripts/analyzer/errors/enum_class_var_init_with_wrong_enum_type.out b/modules/gdscript/tests/scripts/analyzer/errors/enum_class_var_init_with_wrong_enum_type.out index 4b6b42b0242..8b53d95446f 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/enum_class_var_init_with_wrong_enum_type.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/enum_class_var_init_with_wrong_enum_type.out @@ -1,2 +1,3 @@ GDTEST_ANALYZER_ERROR -Cannot assign a value of type "enum_class_var_init_with_wrong_enum_type.gd.MyOtherEnum" as "enum_class_var_init_with_wrong_enum_type.gd.MyEnum". +>> ERROR at line 5: Cannot assign a value of type "enum_class_var_init_with_wrong_enum_type.gd.MyOtherEnum" as "enum_class_var_init_with_wrong_enum_type.gd.MyEnum". +>> ERROR at line 5: Cannot assign a value of type enum_class_var_init_with_wrong_enum_type.gd.MyOtherEnum to variable "class_var" with specified type enum_class_var_init_with_wrong_enum_type.gd.MyEnum. diff --git a/modules/gdscript/tests/scripts/analyzer/errors/enum_duplicate_bad_method.out b/modules/gdscript/tests/scripts/analyzer/errors/enum_duplicate_bad_method.out index 9ca86eca9cc..2a2554db8b3 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/enum_duplicate_bad_method.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/enum_duplicate_bad_method.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Cannot call non-const Dictionary function "clear()" on enum "Enum". +>> ERROR at line 5: Cannot call non-const Dictionary function "clear()" on enum "Enum". diff --git a/modules/gdscript/tests/scripts/analyzer/errors/enum_float_value.out b/modules/gdscript/tests/scripts/analyzer/errors/enum_float_value.out index b315d205084..6d9be86593f 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/enum_float_value.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/enum_float_value.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Enum values must be integers. +>> ERROR at line 3: Enum values must be integers. diff --git a/modules/gdscript/tests/scripts/analyzer/errors/enum_function_parameter_wrong_type.out b/modules/gdscript/tests/scripts/analyzer/errors/enum_function_parameter_wrong_type.out index adde630a0b1..35cdbef72f9 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/enum_function_parameter_wrong_type.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/enum_function_parameter_wrong_type.out @@ -1,2 +1,3 @@ GDTEST_ANALYZER_ERROR -Cannot pass a value of type "enum_function_parameter_wrong_type.gd.MyOtherEnum" as "enum_function_parameter_wrong_type.gd.MyEnum". +>> ERROR at line 8: Cannot pass a value of type "enum_function_parameter_wrong_type.gd.MyOtherEnum" as "enum_function_parameter_wrong_type.gd.MyEnum". +>> ERROR at line 8: Invalid argument for "enum_func()" function: argument 1 should be "enum_function_parameter_wrong_type.gd.MyEnum" but is "enum_function_parameter_wrong_type.gd.MyOtherEnum". diff --git a/modules/gdscript/tests/scripts/analyzer/errors/enum_function_return_wrong_type.out b/modules/gdscript/tests/scripts/analyzer/errors/enum_function_return_wrong_type.out index 9ee3fb7c062..2eb17d5889a 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/enum_function_return_wrong_type.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/enum_function_return_wrong_type.out @@ -1,2 +1,3 @@ GDTEST_ANALYZER_ERROR -Cannot return a value of type "enum_function_return_wrong_type.gd.MyOtherEnum" as "enum_function_return_wrong_type.gd.MyEnum". +>> ERROR at line 5: Cannot return a value of type "enum_function_return_wrong_type.gd.MyOtherEnum" as "enum_function_return_wrong_type.gd.MyEnum". +>> ERROR at line 5: Cannot return value of type "enum_function_return_wrong_type.gd.MyOtherEnum" because the function return type is "enum_function_return_wrong_type.gd.MyEnum". diff --git a/modules/gdscript/tests/scripts/analyzer/errors/enum_local_var_assign_outer_with_wrong_enum_type.out b/modules/gdscript/tests/scripts/analyzer/errors/enum_local_var_assign_outer_with_wrong_enum_type.out index 8de7bde50de..d5043e188fa 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/enum_local_var_assign_outer_with_wrong_enum_type.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/enum_local_var_assign_outer_with_wrong_enum_type.out @@ -1,2 +1,3 @@ GDTEST_ANALYZER_ERROR -Cannot assign a value of type "enum_local_var_assign_outer_with_wrong_enum_type.gd::InnerClass.MyEnum" as "enum_local_var_assign_outer_with_wrong_enum_type.gd.MyEnum". +>> ERROR at line 9: Cannot assign a value of type "enum_local_var_assign_outer_with_wrong_enum_type.gd::InnerClass.MyEnum" as "enum_local_var_assign_outer_with_wrong_enum_type.gd.MyEnum". +>> ERROR at line 9: Value of type "enum_local_var_assign_outer_with_wrong_enum_type.gd::InnerClass.MyEnum" cannot be assigned to a variable of type "enum_local_var_assign_outer_with_wrong_enum_type.gd.MyEnum". diff --git a/modules/gdscript/tests/scripts/analyzer/errors/enum_local_var_assign_with_wrong_enum_type.out b/modules/gdscript/tests/scripts/analyzer/errors/enum_local_var_assign_with_wrong_enum_type.out index e2139e75f60..ceb6eab0092 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/enum_local_var_assign_with_wrong_enum_type.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/enum_local_var_assign_with_wrong_enum_type.out @@ -1,2 +1,3 @@ GDTEST_ANALYZER_ERROR -Cannot assign a value of type "enum_local_var_assign_with_wrong_enum_type.gd.MyOtherEnum" as "enum_local_var_assign_with_wrong_enum_type.gd.MyEnum". +>> ERROR at line 7: Cannot assign a value of type "enum_local_var_assign_with_wrong_enum_type.gd.MyOtherEnum" as "enum_local_var_assign_with_wrong_enum_type.gd.MyEnum". +>> ERROR at line 7: Value of type "enum_local_var_assign_with_wrong_enum_type.gd.MyOtherEnum" cannot be assigned to a variable of type "enum_local_var_assign_with_wrong_enum_type.gd.MyEnum". diff --git a/modules/gdscript/tests/scripts/analyzer/errors/enum_local_var_init_with_wrong_enum_type.out b/modules/gdscript/tests/scripts/analyzer/errors/enum_local_var_init_with_wrong_enum_type.out index 46c0553c289..fccd612baec 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/enum_local_var_init_with_wrong_enum_type.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/enum_local_var_init_with_wrong_enum_type.out @@ -1,2 +1,3 @@ GDTEST_ANALYZER_ERROR -Cannot assign a value of type "enum_local_var_init_with_wrong_enum_type.gd.MyOtherEnum" as "enum_local_var_init_with_wrong_enum_type.gd.MyEnum". +>> ERROR at line 5: Cannot assign a value of type "enum_local_var_init_with_wrong_enum_type.gd.MyOtherEnum" as "enum_local_var_init_with_wrong_enum_type.gd.MyEnum". +>> ERROR at line 5: Cannot assign a value of type enum_local_var_init_with_wrong_enum_type.gd.MyOtherEnum to variable "local_var" with specified type enum_local_var_init_with_wrong_enum_type.gd.MyEnum. diff --git a/modules/gdscript/tests/scripts/analyzer/errors/enum_name_shadows_builtin_type.out b/modules/gdscript/tests/scripts/analyzer/errors/enum_name_shadows_builtin_type.out index 87863baf758..ce8d9807b2f 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/enum_name_shadows_builtin_type.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/enum_name_shadows_builtin_type.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -The member "Vector2" cannot have the same name as a builtin type. +>> ERROR at line 1: The member "Vector2" cannot have the same name as a builtin type. diff --git a/modules/gdscript/tests/scripts/analyzer/errors/enum_native_bad_value.out b/modules/gdscript/tests/scripts/analyzer/errors/enum_native_bad_value.out index 4b1db77a350..1af8b3e283d 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/enum_native_bad_value.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/enum_native_bad_value.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Cannot find member "THIS_DOES_NOT_EXIST" in base "TileSet.TileShape". +>> ERROR at line 2: Cannot find member "THIS_DOES_NOT_EXIST" in base "TileSet.TileShape". diff --git a/modules/gdscript/tests/scripts/analyzer/errors/enum_preload_unnamed_assign_to_named.out b/modules/gdscript/tests/scripts/analyzer/errors/enum_preload_unnamed_assign_to_named.out index ddd26e7399f..d24d294f084 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/enum_preload_unnamed_assign_to_named.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/enum_preload_unnamed_assign_to_named.out @@ -1,2 +1,3 @@ GDTEST_ANALYZER_ERROR -Cannot assign a value of type "enum_value_from_parent.gd." as "enum_preload_unnamed_assign_to_named.gd.MyEnum". +>> ERROR at line 6: Cannot assign a value of type "enum_value_from_parent.gd." as "enum_preload_unnamed_assign_to_named.gd.MyEnum". +>> ERROR at line 6: Value of type "enum_value_from_parent.gd." cannot be assigned to a variable of type "enum_preload_unnamed_assign_to_named.gd.MyEnum". diff --git a/modules/gdscript/tests/scripts/analyzer/errors/enum_shadows_base_enum.out b/modules/gdscript/tests/scripts/analyzer/errors/enum_shadows_base_enum.out index 7961a1a481c..8c599ac6d88 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/enum_shadows_base_enum.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/enum_shadows_base_enum.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -The member "V" already exists in parent class A. +>> ERROR at line 5: The member "V" already exists in parent class A. diff --git a/modules/gdscript/tests/scripts/analyzer/errors/enum_string_value.out b/modules/gdscript/tests/scripts/analyzer/errors/enum_string_value.out index b315d205084..6d9be86593f 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/enum_string_value.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/enum_string_value.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Enum values must be integers. +>> ERROR at line 3: Enum values must be integers. diff --git a/modules/gdscript/tests/scripts/analyzer/errors/enum_unnamed_assign_to_named.out b/modules/gdscript/tests/scripts/analyzer/errors/enum_unnamed_assign_to_named.out index 3a65978aa34..69ea54370c3 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/enum_unnamed_assign_to_named.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/enum_unnamed_assign_to_named.out @@ -1,2 +1,3 @@ GDTEST_ANALYZER_ERROR -Cannot assign a value of type "enum_unnamed_assign_to_named.gd." as "enum_unnamed_assign_to_named.gd.MyEnum". +>> ERROR at line 6: Cannot assign a value of type "enum_unnamed_assign_to_named.gd." as "enum_unnamed_assign_to_named.gd.MyEnum". +>> ERROR at line 6: Cannot assign a value of type enum_unnamed_assign_to_named.gd. to variable "local_var" with specified type enum_unnamed_assign_to_named.gd.MyEnum. diff --git a/modules/gdscript/tests/scripts/analyzer/errors/export_node_in_non_node_derived_class_1.out b/modules/gdscript/tests/scripts/analyzer/errors/export_node_in_non_node_derived_class_1.out index 9a45bbb515a..1ca9bd82fc5 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/export_node_in_non_node_derived_class_1.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/export_node_in_non_node_derived_class_1.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Node export is only supported in Node-derived classes, but the current class inherits "Resource". +>> ERROR at line 5: Node export is only supported in Node-derived classes, but the current class inherits "Resource". diff --git a/modules/gdscript/tests/scripts/analyzer/errors/export_node_in_non_node_derived_class_2.out b/modules/gdscript/tests/scripts/analyzer/errors/export_node_in_non_node_derived_class_2.out index 3da6d6d7ac2..8bffe49dd0c 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/export_node_in_non_node_derived_class_2.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/export_node_in_non_node_derived_class_2.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Node export is only supported in Node-derived classes, but the current class inherits "RefCounted". +>> ERROR at line 6: Node export is only supported in Node-derived classes, but the current class inherits "RefCounted". diff --git a/modules/gdscript/tests/scripts/analyzer/errors/export_node_in_non_node_derived_class_3.out b/modules/gdscript/tests/scripts/analyzer/errors/export_node_in_non_node_derived_class_3.out index 9a45bbb515a..1ca9bd82fc5 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/export_node_in_non_node_derived_class_3.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/export_node_in_non_node_derived_class_3.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Node export is only supported in Node-derived classes, but the current class inherits "Resource". +>> ERROR at line 5: Node export is only supported in Node-derived classes, but the current class inherits "Resource". diff --git a/modules/gdscript/tests/scripts/analyzer/errors/extend_engine_singleton.out b/modules/gdscript/tests/scripts/analyzer/errors/extend_engine_singleton.out index 7c26dea56ed..6f739d72bf3 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/extend_engine_singleton.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/extend_engine_singleton.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Cannot inherit native class "Time" because it is an engine singleton. +>> ERROR at line 3: Cannot inherit native class "Time" because it is an engine singleton. diff --git a/modules/gdscript/tests/scripts/analyzer/errors/extend_non_class_constant_1.out b/modules/gdscript/tests/scripts/analyzer/errors/extend_non_class_constant_1.out index 65d629a35b6..55d711de82c 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/extend_non_class_constant_1.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/extend_non_class_constant_1.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Constant "A" is not a preloaded script or class. +>> ERROR at line 5: Constant "A" is not a preloaded script or class. diff --git a/modules/gdscript/tests/scripts/analyzer/errors/extend_non_class_constant_2.out b/modules/gdscript/tests/scripts/analyzer/errors/extend_non_class_constant_2.out index 951cfb1ea41..cf55c12855b 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/extend_non_class_constant_2.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/extend_non_class_constant_2.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Identifier "X" is not a preloaded script or class. +>> ERROR at line 8: Identifier "X" is not a preloaded script or class. diff --git a/modules/gdscript/tests/scripts/analyzer/errors/extend_non_gdscript_nested.out b/modules/gdscript/tests/scripts/analyzer/errors/extend_non_gdscript_nested.out index 386d6261c6c..0200a117aec 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/extend_non_gdscript_nested.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/extend_non_gdscript_nested.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Cannot get nested types for extension from non-GDScript type "RefCounted". +>> ERROR at line 1: Cannot get nested types for extension from non-GDScript type "RefCounted". diff --git a/modules/gdscript/tests/scripts/analyzer/errors/extend_unknown.out b/modules/gdscript/tests/scripts/analyzer/errors/extend_unknown.out index 42873056f24..35361d5685f 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/extend_unknown.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/extend_unknown.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Could not find nested type "Baz". +>> ERROR at line 4: Could not find nested type "Baz". diff --git a/modules/gdscript/tests/scripts/analyzer/errors/extend_variable.out b/modules/gdscript/tests/scripts/analyzer/errors/extend_variable.out index 7b39af69792..7baa02be9b1 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/extend_variable.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/extend_variable.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Cannot use variable "A" in extends chain. +>> ERROR at line 5: Cannot use variable "A" in extends chain. diff --git a/modules/gdscript/tests/scripts/analyzer/errors/for_loop_on_constant_float.out b/modules/gdscript/tests/scripts/analyzer/errors/for_loop_on_constant_float.out index e309831b3ee..28f0886fd5e 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/for_loop_on_constant_float.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/for_loop_on_constant_float.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Expression is of type "float" so it can't be of type "String". +>> ERROR at line 5: Expression is of type "float" so it can't be of type "String". diff --git a/modules/gdscript/tests/scripts/analyzer/errors/for_loop_on_constant_int.out b/modules/gdscript/tests/scripts/analyzer/errors/for_loop_on_constant_int.out index 54c190cf8a1..c42bb0f974a 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/for_loop_on_constant_int.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/for_loop_on_constant_int.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Expression is of type "int" so it can't be of type "String". +>> ERROR at line 5: Expression is of type "int" so it can't be of type "String". diff --git a/modules/gdscript/tests/scripts/analyzer/errors/for_loop_on_enum_value.out b/modules/gdscript/tests/scripts/analyzer/errors/for_loop_on_enum_value.out index 54c190cf8a1..c42bb0f974a 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/for_loop_on_enum_value.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/for_loop_on_enum_value.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Expression is of type "int" so it can't be of type "String". +>> ERROR at line 5: Expression is of type "int" so it can't be of type "String". diff --git a/modules/gdscript/tests/scripts/analyzer/errors/for_loop_on_hard_float.out b/modules/gdscript/tests/scripts/analyzer/errors/for_loop_on_hard_float.out index e309831b3ee..28f0886fd5e 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/for_loop_on_hard_float.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/for_loop_on_hard_float.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Expression is of type "float" so it can't be of type "String". +>> ERROR at line 5: Expression is of type "float" so it can't be of type "String". diff --git a/modules/gdscript/tests/scripts/analyzer/errors/for_loop_on_hard_int.out b/modules/gdscript/tests/scripts/analyzer/errors/for_loop_on_hard_int.out index 54c190cf8a1..c42bb0f974a 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/for_loop_on_hard_int.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/for_loop_on_hard_int.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Expression is of type "int" so it can't be of type "String". +>> ERROR at line 5: Expression is of type "int" so it can't be of type "String". diff --git a/modules/gdscript/tests/scripts/analyzer/errors/for_loop_on_hard_iterator.out b/modules/gdscript/tests/scripts/analyzer/errors/for_loop_on_hard_iterator.out index a48591a3b4c..91aefc3f2ce 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/for_loop_on_hard_iterator.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/for_loop_on_hard_iterator.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Expression is of type "StringName" so it can't be of type "int". +>> ERROR at line 13: Expression is of type "StringName" so it can't be of type "int". diff --git a/modules/gdscript/tests/scripts/analyzer/errors/for_loop_on_hard_string.out b/modules/gdscript/tests/scripts/analyzer/errors/for_loop_on_hard_string.out index 92c5ebc599f..1e9d9e4ec80 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/for_loop_on_hard_string.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/for_loop_on_hard_string.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Expression is of type "String" so it can't be of type "int". +>> ERROR at line 5: Expression is of type "String" so it can't be of type "int". diff --git a/modules/gdscript/tests/scripts/analyzer/errors/for_loop_on_literal_bool.out b/modules/gdscript/tests/scripts/analyzer/errors/for_loop_on_literal_bool.out index 94cb038885a..a9e118ca3d6 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/for_loop_on_literal_bool.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/for_loop_on_literal_bool.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Unable to iterate on value of type "bool". +>> ERROR at line 2: Unable to iterate on value of type "bool". diff --git a/modules/gdscript/tests/scripts/analyzer/errors/for_loop_on_literal_int.out b/modules/gdscript/tests/scripts/analyzer/errors/for_loop_on_literal_int.out index 54c190cf8a1..d812e7a5b6a 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/for_loop_on_literal_int.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/for_loop_on_literal_int.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Expression is of type "int" so it can't be of type "String". +>> ERROR at line 3: Expression is of type "int" so it can't be of type "String". diff --git a/modules/gdscript/tests/scripts/analyzer/errors/for_loop_wrong_specified_type.out b/modules/gdscript/tests/scripts/analyzer/errors/for_loop_wrong_specified_type.out index 8f8a368f9ae..f84bcf7873a 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/for_loop_wrong_specified_type.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/for_loop_wrong_specified_type.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Unable to iterate on value of type "Array[Resource]" with variable of type "Node". +>> ERROR at line 3: Unable to iterate on value of type "Array[Resource]" with variable of type "Node". diff --git a/modules/gdscript/tests/scripts/analyzer/errors/for_loop_wrong_specified_type_with_literal_array.out b/modules/gdscript/tests/scripts/analyzer/errors/for_loop_wrong_specified_type_with_literal_array.out index 0bb654e7e23..8d7c515d629 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/for_loop_wrong_specified_type_with_literal_array.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/for_loop_wrong_specified_type_with_literal_array.out @@ -1,2 +1,3 @@ GDTEST_ANALYZER_ERROR -Cannot include a value of type "int" as "String". +>> ERROR at line 4: Cannot include a value of type "int" as "String". +>> ERROR at line 4: Cannot have an element of type "int" in an array of type "Array[String]". diff --git a/modules/gdscript/tests/scripts/analyzer/errors/for_loop_wrong_specified_type_with_literal_dictionary.out b/modules/gdscript/tests/scripts/analyzer/errors/for_loop_wrong_specified_type_with_literal_dictionary.out index 8530783673d..6ec5c275e45 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/for_loop_wrong_specified_type_with_literal_dictionary.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/for_loop_wrong_specified_type_with_literal_dictionary.out @@ -1,2 +1,3 @@ GDTEST_ANALYZER_ERROR -Cannot include a value of type "String" as "int". +>> ERROR at line 2: Cannot include a value of type "String" as "int". +>> ERROR at line 2: Cannot have a key of type "String" in a dictionary of type "Dictionary[int, Variant]". diff --git a/modules/gdscript/tests/scripts/analyzer/errors/function_dont_match_parent_signature_parameter_count_less.out b/modules/gdscript/tests/scripts/analyzer/errors/function_dont_match_parent_signature_parameter_count_less.out index 4ccd2da3811..4b706eb8277 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/function_dont_match_parent_signature_parameter_count_less.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/function_dont_match_parent_signature_parameter_count_less.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -The function signature doesn't match the parent. Parent signature is "my_function(int) -> int". +>> ERROR at line 9: The function signature doesn't match the parent. Parent signature is "my_function(int) -> int". diff --git a/modules/gdscript/tests/scripts/analyzer/errors/function_dont_match_parent_signature_parameter_count_more.out b/modules/gdscript/tests/scripts/analyzer/errors/function_dont_match_parent_signature_parameter_count_more.out index 4ccd2da3811..4b706eb8277 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/function_dont_match_parent_signature_parameter_count_more.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/function_dont_match_parent_signature_parameter_count_more.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -The function signature doesn't match the parent. Parent signature is "my_function(int) -> int". +>> ERROR at line 9: The function signature doesn't match the parent. Parent signature is "my_function(int) -> int". diff --git a/modules/gdscript/tests/scripts/analyzer/errors/function_dont_match_parent_signature_parameter_default_values.out b/modules/gdscript/tests/scripts/analyzer/errors/function_dont_match_parent_signature_parameter_default_values.out index 508e46742f1..27c77fa04ee 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/function_dont_match_parent_signature_parameter_default_values.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/function_dont_match_parent_signature_parameter_default_values.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -The function signature doesn't match the parent. Parent signature is "my_function(int = ) -> int". +>> ERROR at line 9: The function signature doesn't match the parent. Parent signature is "my_function(int = ) -> int". diff --git a/modules/gdscript/tests/scripts/analyzer/errors/function_dont_match_parent_signature_parameter_type.out b/modules/gdscript/tests/scripts/analyzer/errors/function_dont_match_parent_signature_parameter_type.out index 4ccd2da3811..4b706eb8277 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/function_dont_match_parent_signature_parameter_type.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/function_dont_match_parent_signature_parameter_type.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -The function signature doesn't match the parent. Parent signature is "my_function(int) -> int". +>> ERROR at line 9: The function signature doesn't match the parent. Parent signature is "my_function(int) -> int". diff --git a/modules/gdscript/tests/scripts/analyzer/errors/function_dont_match_parent_signature_return_type.out b/modules/gdscript/tests/scripts/analyzer/errors/function_dont_match_parent_signature_return_type.out index 61004ff627e..3393b17dab8 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/function_dont_match_parent_signature_return_type.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/function_dont_match_parent_signature_return_type.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -The function signature doesn't match the parent. Parent signature is "my_function() -> int". +>> ERROR at line 9: The function signature doesn't match the parent. Parent signature is "my_function() -> int". diff --git a/modules/gdscript/tests/scripts/analyzer/errors/function_param_type_invalid_contravariance_1.out b/modules/gdscript/tests/scripts/analyzer/errors/function_param_type_invalid_contravariance_1.out index c6a7e40e8cb..ff37d4298e5 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/function_param_type_invalid_contravariance_1.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/function_param_type_invalid_contravariance_1.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -The function signature doesn't match the parent. Parent signature is "f(Object) -> Variant". +>> ERROR at line 6: The function signature doesn't match the parent. Parent signature is "f(Object) -> Variant". diff --git a/modules/gdscript/tests/scripts/analyzer/errors/function_param_type_invalid_contravariance_2.out b/modules/gdscript/tests/scripts/analyzer/errors/function_param_type_invalid_contravariance_2.out index 52a6efc6fca..0e9f07e18ac 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/function_param_type_invalid_contravariance_2.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/function_param_type_invalid_contravariance_2.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -The function signature doesn't match the parent. Parent signature is "f(Variant) -> Variant". +>> ERROR at line 6: The function signature doesn't match the parent. Parent signature is "f(Variant) -> Variant". diff --git a/modules/gdscript/tests/scripts/analyzer/errors/function_param_type_invalid_contravariance_3.out b/modules/gdscript/tests/scripts/analyzer/errors/function_param_type_invalid_contravariance_3.out index 7a6207fd45b..f2461c50026 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/function_param_type_invalid_contravariance_3.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/function_param_type_invalid_contravariance_3.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -The function signature doesn't match the parent. Parent signature is "f(int) -> Variant". +>> ERROR at line 6: The function signature doesn't match the parent. Parent signature is "f(int) -> Variant". diff --git a/modules/gdscript/tests/scripts/analyzer/errors/function_return_type_invalid_covariance_1.out b/modules/gdscript/tests/scripts/analyzer/errors/function_return_type_invalid_covariance_1.out index e680b2bd779..fc326592d6a 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/function_return_type_invalid_covariance_1.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/function_return_type_invalid_covariance_1.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -The function signature doesn't match the parent. Parent signature is "f() -> Node". +>> ERROR at line 6: The function signature doesn't match the parent. Parent signature is "f() -> Node". diff --git a/modules/gdscript/tests/scripts/analyzer/errors/function_return_type_invalid_covariance_2.out b/modules/gdscript/tests/scripts/analyzer/errors/function_return_type_invalid_covariance_2.out index e680b2bd779..fc326592d6a 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/function_return_type_invalid_covariance_2.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/function_return_type_invalid_covariance_2.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -The function signature doesn't match the parent. Parent signature is "f() -> Node". +>> ERROR at line 6: The function signature doesn't match the parent. Parent signature is "f() -> Node". diff --git a/modules/gdscript/tests/scripts/analyzer/errors/function_return_type_invalid_covariance_3.out b/modules/gdscript/tests/scripts/analyzer/errors/function_return_type_invalid_covariance_3.out index e680b2bd779..fc326592d6a 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/function_return_type_invalid_covariance_3.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/function_return_type_invalid_covariance_3.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -The function signature doesn't match the parent. Parent signature is "f() -> Node". +>> ERROR at line 6: The function signature doesn't match the parent. Parent signature is "f() -> Node". diff --git a/modules/gdscript/tests/scripts/analyzer/errors/function_return_type_invalid_covariance_4.out b/modules/gdscript/tests/scripts/analyzer/errors/function_return_type_invalid_covariance_4.out index 72f2c493d48..ef983348adb 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/function_return_type_invalid_covariance_4.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/function_return_type_invalid_covariance_4.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -The function signature doesn't match the parent. Parent signature is "f() -> float". +>> ERROR at line 6: The function signature doesn't match the parent. Parent signature is "f() -> float". diff --git a/modules/gdscript/tests/scripts/analyzer/errors/function_used_as_property.out b/modules/gdscript/tests/scripts/analyzer/errors/function_used_as_property.out index 5275183da27..8567a08532f 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/function_used_as_property.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/function_used_as_property.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Cannot assign a new value to a constant. +>> ERROR at line 6: Cannot assign a new value to a constant. diff --git a/modules/gdscript/tests/scripts/analyzer/errors/gd_utility_function_wrong_arg.out b/modules/gdscript/tests/scripts/analyzer/errors/gd_utility_function_wrong_arg.out index 9cb04f62403..300a14ab740 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/gd_utility_function_wrong_arg.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/gd_utility_function_wrong_arg.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Invalid argument for "len()" function: Value of type 'Color' can't provide a length. +>> ERROR at line 2: Invalid argument for "len()" function: Value of type 'Color' can't provide a length. diff --git a/modules/gdscript/tests/scripts/analyzer/errors/get_node_shorthand_in_static_function.out b/modules/gdscript/tests/scripts/analyzer/errors/get_node_shorthand_in_static_function.out index 1910b3e66b5..4b8f3b31510 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/get_node_shorthand_in_static_function.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/get_node_shorthand_in_static_function.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Cannot use shorthand "get_node()" notation ("$") in a static function. +>> ERROR at line 6: Cannot use shorthand "get_node()" notation ("$") in a static function. diff --git a/modules/gdscript/tests/scripts/analyzer/errors/get_node_shorthand_within_non_node.out b/modules/gdscript/tests/scripts/analyzer/errors/get_node_shorthand_within_non_node.out index 33365908bf6..5f1a5c2ec80 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/get_node_shorthand_within_non_node.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/get_node_shorthand_within_non_node.out @@ -1,2 +1,3 @@ GDTEST_ANALYZER_ERROR -Cannot use shorthand "get_node()" notation ("$") on a class that isn't a node. +>> ERROR at line 4: Cannot use shorthand "get_node()" notation ("$") on a class that isn't a node. +>> ERROR at line 4: Cannot infer the type of "nope" variable because the value doesn't have a set type. diff --git a/modules/gdscript/tests/scripts/analyzer/errors/incompatible_assignment.out b/modules/gdscript/tests/scripts/analyzer/errors/incompatible_assignment.out index 358b096a644..f5a1f2f4ff6 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/incompatible_assignment.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/incompatible_assignment.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Invalid operands "bool" and "String" for assignment operator. +>> ERROR at line 3: Invalid operands "bool" and "String" for assignment operator. diff --git a/modules/gdscript/tests/scripts/analyzer/errors/inferring_with_weak_type_local_variable.out b/modules/gdscript/tests/scripts/analyzer/errors/inferring_with_weak_type_local_variable.out index b6dc6d0b013..d6d818891b4 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/inferring_with_weak_type_local_variable.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/inferring_with_weak_type_local_variable.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Cannot infer the type of "inferred" variable because the value doesn't have a set type. +>> ERROR at line 3: Cannot infer the type of "inferred" variable because the value doesn't have a set type. diff --git a/modules/gdscript/tests/scripts/analyzer/errors/inferring_with_weak_type_member_variable.out b/modules/gdscript/tests/scripts/analyzer/errors/inferring_with_weak_type_member_variable.out index b6dc6d0b013..aa4c98a4ba6 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/inferring_with_weak_type_member_variable.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/inferring_with_weak_type_member_variable.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Cannot infer the type of "inferred" variable because the value doesn't have a set type. +>> ERROR at line 2: Cannot infer the type of "inferred" variable because the value doesn't have a set type. diff --git a/modules/gdscript/tests/scripts/analyzer/errors/inferring_with_weak_type_parameter.out b/modules/gdscript/tests/scripts/analyzer/errors/inferring_with_weak_type_parameter.out index 8c9f0c13ae5..dca793b5a09 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/inferring_with_weak_type_parameter.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/inferring_with_weak_type_parameter.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Cannot infer the type of "inferred" parameter because the value doesn't have a set type. +>> ERROR at line 1: Cannot infer the type of "inferred" parameter because the value doesn't have a set type. diff --git a/modules/gdscript/tests/scripts/analyzer/errors/invalid_array_index.out b/modules/gdscript/tests/scripts/analyzer/errors/invalid_array_index.out index 015ad756f8c..24ae8a553b1 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/invalid_array_index.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/invalid_array_index.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Invalid index type "bool" for a base of type "Array". +>> ERROR at line 3: Invalid index type "bool" for a base of type "Array". diff --git a/modules/gdscript/tests/scripts/analyzer/errors/invalid_concatenation_bool.out b/modules/gdscript/tests/scripts/analyzer/errors/invalid_concatenation_bool.out index c1dc7c7d08b..e2ff31efbea 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/invalid_concatenation_bool.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/invalid_concatenation_bool.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Invalid operands to operator +, bool and bool. +>> ERROR at line 2: Invalid operands to operator +, bool and bool. diff --git a/modules/gdscript/tests/scripts/analyzer/errors/invalid_concatenation_dictionary.out b/modules/gdscript/tests/scripts/analyzer/errors/invalid_concatenation_dictionary.out index 1b4451edbe4..a120670f382 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/invalid_concatenation_dictionary.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/invalid_concatenation_dictionary.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Invalid operands "Dictionary" and "Dictionary" for "+" operator. +>> ERROR at line 2: Invalid operands "Dictionary" and "Dictionary" for "+" operator. diff --git a/modules/gdscript/tests/scripts/analyzer/errors/invalid_concatenation_mixed.out b/modules/gdscript/tests/scripts/analyzer/errors/invalid_concatenation_mixed.out index 6d44c6c1bd4..bce8b7d1051 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/invalid_concatenation_mixed.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/invalid_concatenation_mixed.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Invalid operands "String" and "Array" for "+" operator. +>> ERROR at line 2: Invalid operands "String" and "Array" for "+" operator. diff --git a/modules/gdscript/tests/scripts/analyzer/errors/invalid_constant.out b/modules/gdscript/tests/scripts/analyzer/errors/invalid_constant.out index c40830f1235..141aa3d1fc2 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/invalid_constant.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/invalid_constant.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Assigned value for constant "TEST" isn't a constant expression. +>> ERROR at line 5: Assigned value for constant "TEST" isn't a constant expression. diff --git a/modules/gdscript/tests/scripts/analyzer/errors/lambda_cyclic_ref_call_arg.out b/modules/gdscript/tests/scripts/analyzer/errors/lambda_cyclic_ref_call_arg.out index 6bca25b3306..e439b4eefeb 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/lambda_cyclic_ref_call_arg.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/lambda_cyclic_ref_call_arg.out @@ -1,2 +1,3 @@ GDTEST_ANALYZER_ERROR -Could not resolve member "f": Cyclic reference. +>> ERROR at line 2: Could not resolve member "f": Cyclic reference. +>> ERROR at line 2: Could not resolve type for variable "x". diff --git a/modules/gdscript/tests/scripts/analyzer/errors/lambda_cyclic_ref_param.out b/modules/gdscript/tests/scripts/analyzer/errors/lambda_cyclic_ref_param.out index 6bca25b3306..e439b4eefeb 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/lambda_cyclic_ref_param.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/lambda_cyclic_ref_param.out @@ -1,2 +1,3 @@ GDTEST_ANALYZER_ERROR -Could not resolve member "f": Cyclic reference. +>> ERROR at line 2: Could not resolve member "f": Cyclic reference. +>> ERROR at line 2: Could not resolve type for variable "x". diff --git a/modules/gdscript/tests/scripts/analyzer/errors/lambda_no_return.out b/modules/gdscript/tests/scripts/analyzer/errors/lambda_no_return.out index fe1472c54d8..4b09b694b7b 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/lambda_no_return.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/lambda_no_return.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Not all code paths return a value. +>> ERROR at line 2: Not all code paths return a value. diff --git a/modules/gdscript/tests/scripts/analyzer/errors/lambda_wrong_return.out b/modules/gdscript/tests/scripts/analyzer/errors/lambda_wrong_return.out index 69af0984f7d..d79f79d678c 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/lambda_wrong_return.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/lambda_wrong_return.out @@ -1,2 +1,3 @@ GDTEST_ANALYZER_ERROR -Cannot return a value of type "String" as "int". +>> ERROR at line 3: Cannot return a value of type "String" as "int". +>> ERROR at line 3: Cannot return value of type "String" because the function return type is "int". diff --git a/modules/gdscript/tests/scripts/analyzer/errors/leading_number_separator.out b/modules/gdscript/tests/scripts/analyzer/errors/leading_number_separator.out index cfb558bf45c..a18e4c748cf 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/leading_number_separator.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/leading_number_separator.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Identifier "_123" not declared in the current scope. +>> ERROR at line 3: Identifier "_123" not declared in the current scope. diff --git a/modules/gdscript/tests/scripts/analyzer/errors/local_const_as_type_use_before_declared.out b/modules/gdscript/tests/scripts/analyzer/errors/local_const_as_type_use_before_declared.out index e1d5837f327..bf38c6a9b49 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/local_const_as_type_use_before_declared.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/local_const_as_type_use_before_declared.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Local constant "E" is not resolved at this point. +>> ERROR at line 4: Local constant "E" is not resolved at this point. diff --git a/modules/gdscript/tests/scripts/analyzer/errors/local_const_as_type_use_not_const.out b/modules/gdscript/tests/scripts/analyzer/errors/local_const_as_type_use_not_const.out index b1f4e7a2c82..5658a715a6f 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/local_const_as_type_use_not_const.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/local_const_as_type_use_not_const.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Local variable "E" cannot be used as a type. +>> ERROR at line 5: Local variable "E" cannot be used as a type. diff --git a/modules/gdscript/tests/scripts/analyzer/errors/local_const_as_type_use_not_type.out b/modules/gdscript/tests/scripts/analyzer/errors/local_const_as_type_use_not_type.out index c3c2c8ca2f1..1735986fbb6 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/local_const_as_type_use_not_type.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/local_const_as_type_use_not_type.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Local constant "E" is not a valid type. +>> ERROR at line 5: Local constant "E" is not a valid type. diff --git a/modules/gdscript/tests/scripts/analyzer/errors/match_guard_invalid_expression.out b/modules/gdscript/tests/scripts/analyzer/errors/match_guard_invalid_expression.out index c5f0a90d6aa..17a9353c5c4 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/match_guard_invalid_expression.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/match_guard_invalid_expression.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Identifier "a" not declared in the current scope. +>> ERROR at line 3: Identifier "a" not declared in the current scope. diff --git a/modules/gdscript/tests/scripts/analyzer/errors/match_with_subscript.out b/modules/gdscript/tests/scripts/analyzer/errors/match_with_subscript.out index b7385a50d58..9ce8c929948 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/match_with_subscript.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/match_with_subscript.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Expression in match pattern must be a constant expression, an identifier, or an attribute access ("A.B"). +>> ERROR at line 7: Expression in match pattern must be a constant expression, an identifier, or an attribute access ("A.B"). diff --git a/modules/gdscript/tests/scripts/analyzer/errors/match_with_variable_expression.out b/modules/gdscript/tests/scripts/analyzer/errors/match_with_variable_expression.out index b7385a50d58..b9a207917fc 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/match_with_variable_expression.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/match_with_variable_expression.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Expression in match pattern must be a constant expression, an identifier, or an attribute access ("A.B"). +>> ERROR at line 4: Expression in match pattern must be a constant expression, an identifier, or an attribute access ("A.B"). diff --git a/modules/gdscript/tests/scripts/analyzer/errors/missing_argument.out b/modules/gdscript/tests/scripts/analyzer/errors/missing_argument.out index fc2a891109d..a4fc53556ae 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/missing_argument.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/missing_argument.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Too few arguments for "args()" call. Expected at least 2 but received 1. +>> ERROR at line 6: Too few arguments for "args()" call. Expected at least 2 but received 1. diff --git a/modules/gdscript/tests/scripts/analyzer/errors/native_freed_instance.gd b/modules/gdscript/tests/scripts/analyzer/errors/native_freed_instance.gd deleted file mode 100644 index 63c080e5834..00000000000 --- a/modules/gdscript/tests/scripts/analyzer/errors/native_freed_instance.gd +++ /dev/null @@ -1,7 +0,0 @@ -func test(): - var x = Node.new() - - x.free() - - var ok = x - var bad: Node = x diff --git a/modules/gdscript/tests/scripts/analyzer/errors/native_freed_instance.out b/modules/gdscript/tests/scripts/analyzer/errors/native_freed_instance.out deleted file mode 100644 index 679e51ed811..00000000000 --- a/modules/gdscript/tests/scripts/analyzer/errors/native_freed_instance.out +++ /dev/null @@ -1,6 +0,0 @@ -GDTEST_RUNTIME_ERROR ->> SCRIPT ERROR ->> on function: test() ->> analyzer/errors/native_freed_instance.gd ->> 7 ->> Trying to assign invalid previously freed instance. diff --git a/modules/gdscript/tests/scripts/analyzer/errors/native_type_errors.out b/modules/gdscript/tests/scripts/analyzer/errors/native_type_errors.out index 06180c3a551..e4d23487881 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/native_type_errors.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/native_type_errors.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Cannot find member "this_does_not_exist" in base "TileSet". +>> ERROR at line 2: Cannot find member "this_does_not_exist" in base "TileSet". diff --git a/modules/gdscript/tests/scripts/analyzer/errors/not_found_type.out b/modules/gdscript/tests/scripts/analyzer/errors/not_found_type.out index 3f6c2d868d6..fe7c68a1cd2 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/not_found_type.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/not_found_type.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Could not find type "Foo" in the current scope. +>> ERROR at line 2: Could not find type "Foo" in the current scope. diff --git a/modules/gdscript/tests/scripts/analyzer/errors/object_invalid_constructor.out b/modules/gdscript/tests/scripts/analyzer/errors/object_invalid_constructor.out index 27668fcd48d..936c30150c0 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/object_invalid_constructor.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/object_invalid_constructor.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Invalid constructor "Object()", use "Object.new()" instead. +>> ERROR at line 4: Invalid constructor "Object()", use "Object.new()" instead. diff --git a/modules/gdscript/tests/scripts/analyzer/errors/onready_within_non_node.out b/modules/gdscript/tests/scripts/analyzer/errors/onready_within_non_node.out index 8088d283295..b1551fdd0fd 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/onready_within_non_node.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/onready_within_non_node.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -"@onready" can only be used in classes that inherit "Node". +>> ERROR at line 3: "@onready" can only be used in classes that inherit "Node". diff --git a/modules/gdscript/tests/scripts/analyzer/errors/onready_within_non_node_inner_class.out b/modules/gdscript/tests/scripts/analyzer/errors/onready_within_non_node_inner_class.out index 8088d283295..e88bdb8160e 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/onready_within_non_node_inner_class.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/onready_within_non_node_inner_class.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -"@onready" can only be used in classes that inherit "Node". +>> ERROR at line 4: "@onready" can only be used in classes that inherit "Node". diff --git a/modules/gdscript/tests/scripts/analyzer/errors/outer_class_constants.gd b/modules/gdscript/tests/scripts/analyzer/errors/outer_class_constants.gd deleted file mode 100644 index 1cf3870a8e6..00000000000 --- a/modules/gdscript/tests/scripts/analyzer/errors/outer_class_constants.gd +++ /dev/null @@ -1,8 +0,0 @@ -class Outer: - const OUTER_CONST: = 0 - class Inner: - pass - -func test() -> void: - var type: = Outer.Inner - print(type.OUTER_CONST) diff --git a/modules/gdscript/tests/scripts/analyzer/errors/outer_class_constants.out b/modules/gdscript/tests/scripts/analyzer/errors/outer_class_constants.out deleted file mode 100644 index a6a39732558..00000000000 --- a/modules/gdscript/tests/scripts/analyzer/errors/outer_class_constants.out +++ /dev/null @@ -1,6 +0,0 @@ -GDTEST_RUNTIME_ERROR ->> SCRIPT ERROR ->> on function: test() ->> analyzer/errors/outer_class_constants.gd ->> 8 ->> Invalid access to property or key 'OUTER_CONST' on a base object of type 'GDScript'. diff --git a/modules/gdscript/tests/scripts/analyzer/errors/outer_class_constants_as_variant.gd b/modules/gdscript/tests/scripts/analyzer/errors/outer_class_constants_as_variant.gd deleted file mode 100644 index c1074df915a..00000000000 --- a/modules/gdscript/tests/scripts/analyzer/errors/outer_class_constants_as_variant.gd +++ /dev/null @@ -1,9 +0,0 @@ -class Outer: - const OUTER_CONST: = 0 - class Inner: - pass - -func test() -> void: - var type: = Outer.Inner - var type_v: Variant = type - print(type_v.OUTER_CONST) diff --git a/modules/gdscript/tests/scripts/analyzer/errors/outer_class_constants_as_variant.out b/modules/gdscript/tests/scripts/analyzer/errors/outer_class_constants_as_variant.out deleted file mode 100644 index 70fdc5b62cf..00000000000 --- a/modules/gdscript/tests/scripts/analyzer/errors/outer_class_constants_as_variant.out +++ /dev/null @@ -1,6 +0,0 @@ -GDTEST_RUNTIME_ERROR ->> SCRIPT ERROR ->> on function: test() ->> analyzer/errors/outer_class_constants_as_variant.gd ->> 9 ->> Invalid access to property or key 'OUTER_CONST' on a base object of type 'GDScript'. diff --git a/modules/gdscript/tests/scripts/analyzer/errors/outer_class_instance_constants.gd b/modules/gdscript/tests/scripts/analyzer/errors/outer_class_instance_constants.gd deleted file mode 100644 index 2631c3c500b..00000000000 --- a/modules/gdscript/tests/scripts/analyzer/errors/outer_class_instance_constants.gd +++ /dev/null @@ -1,8 +0,0 @@ -class Outer: - const OUTER_CONST: = 0 - class Inner: - pass - -func test() -> void: - var instance: = Outer.Inner.new() - print(instance.OUTER_CONST) diff --git a/modules/gdscript/tests/scripts/analyzer/errors/outer_class_instance_constants.out b/modules/gdscript/tests/scripts/analyzer/errors/outer_class_instance_constants.out deleted file mode 100644 index 6632f056bd7..00000000000 --- a/modules/gdscript/tests/scripts/analyzer/errors/outer_class_instance_constants.out +++ /dev/null @@ -1,6 +0,0 @@ -GDTEST_RUNTIME_ERROR ->> SCRIPT ERROR ->> on function: test() ->> analyzer/errors/outer_class_instance_constants.gd ->> 8 ->> Invalid access to property or key 'OUTER_CONST' on a base object of type 'RefCounted (Inner)'. diff --git a/modules/gdscript/tests/scripts/analyzer/errors/outer_class_instance_constants_as_variant.gd b/modules/gdscript/tests/scripts/analyzer/errors/outer_class_instance_constants_as_variant.gd deleted file mode 100644 index cba788381ec..00000000000 --- a/modules/gdscript/tests/scripts/analyzer/errors/outer_class_instance_constants_as_variant.gd +++ /dev/null @@ -1,9 +0,0 @@ -class Outer: - const OUTER_CONST: = 0 - class Inner: - pass - -func test() -> void: - var instance: = Outer.Inner.new() - var instance_v: Variant = instance - print(instance_v.OUTER_CONST) diff --git a/modules/gdscript/tests/scripts/analyzer/errors/outer_class_instance_constants_as_variant.out b/modules/gdscript/tests/scripts/analyzer/errors/outer_class_instance_constants_as_variant.out deleted file mode 100644 index 0459b756d1b..00000000000 --- a/modules/gdscript/tests/scripts/analyzer/errors/outer_class_instance_constants_as_variant.out +++ /dev/null @@ -1,6 +0,0 @@ -GDTEST_RUNTIME_ERROR ->> SCRIPT ERROR ->> on function: test() ->> analyzer/errors/outer_class_instance_constants_as_variant.gd ->> 9 ->> Invalid access to property or key 'OUTER_CONST' on a base object of type 'RefCounted (Inner)'. diff --git a/modules/gdscript/tests/scripts/analyzer/errors/outer_class_lookup.out b/modules/gdscript/tests/scripts/analyzer/errors/outer_class_lookup.out index 6baed366f60..a67e1131e9f 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/outer_class_lookup.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/outer_class_lookup.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Cannot find member "D" in base "B". +>> ERROR at line 4: Cannot find member "D" in base "B". diff --git a/modules/gdscript/tests/scripts/analyzer/errors/overload_script_variable.out b/modules/gdscript/tests/scripts/analyzer/errors/overload_script_variable.out index 8454aaa404c..57bd1865901 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/overload_script_variable.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/overload_script_variable.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Member "script" redefined (original in native class 'Node') +>> ERROR at line 3: Member "script" redefined (original in native class 'Node') diff --git a/modules/gdscript/tests/scripts/analyzer/errors/params_default_forward_reference.out b/modules/gdscript/tests/scripts/analyzer/errors/params_default_forward_reference.out index 1d5b5bf393b..a63890a4803 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/params_default_forward_reference.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/params_default_forward_reference.out @@ -1,2 +1,3 @@ GDTEST_ANALYZER_ERROR -Identifier "defc" not declared in the current scope. +>> ERROR at line 8: Identifier "defc" not declared in the current scope. +>> ERROR at line 9: Identifier "nondefault2" not declared in the current scope. diff --git a/modules/gdscript/tests/scripts/analyzer/errors/preload_enum_error.out b/modules/gdscript/tests/scripts/analyzer/errors/preload_enum_error.out index 21143f2aded..3c066236b1a 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/preload_enum_error.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/preload_enum_error.out @@ -1,2 +1,3 @@ GDTEST_ANALYZER_ERROR -Cannot assign a value of type "enum_from_outer.gd.Named" as "preload_enum_error.gd.LocalNamed". +>> ERROR at line 6: Cannot assign a value of type "enum_from_outer.gd.Named" as "preload_enum_error.gd.LocalNamed". +>> ERROR at line 6: Value of type "enum_from_outer.gd.Named" cannot be assigned to a variable of type "preload_enum_error.gd.LocalNamed". diff --git a/modules/gdscript/tests/scripts/analyzer/errors/prints_base_type_not_found.out b/modules/gdscript/tests/scripts/analyzer/errors/prints_base_type_not_found.out index 29c75ae3c09..25525cd67f4 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/prints_base_type_not_found.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/prints_base_type_not_found.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Could not find type "DoesNotExist" under base "InnerClass". +>> ERROR at line 5: Could not find type "DoesNotExist" under base "InnerClass". diff --git a/modules/gdscript/tests/scripts/analyzer/errors/property_function_get_type_error.out b/modules/gdscript/tests/scripts/analyzer/errors/property_function_get_type_error.out index 29eec51ef25..7e0cadd0127 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/property_function_get_type_error.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/property_function_get_type_error.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Function with return type "int" cannot be used as getter for a property of type "String". +>> ERROR at line 4: Function with return type "int" cannot be used as getter for a property of type "String". diff --git a/modules/gdscript/tests/scripts/analyzer/errors/property_function_set_type_error.out b/modules/gdscript/tests/scripts/analyzer/errors/property_function_set_type_error.out index 7a25280d557..1374a73df1a 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/property_function_set_type_error.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/property_function_set_type_error.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Function with argument type "int" cannot be used as setter for a property of type "String". +>> ERROR at line 4: Function with argument type "int" cannot be used as setter for a property of type "String". diff --git a/modules/gdscript/tests/scripts/analyzer/errors/property_inline_get_type_error.out b/modules/gdscript/tests/scripts/analyzer/errors/property_inline_get_type_error.out index e0adef1bf88..8fe80033ea0 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/property_inline_get_type_error.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/property_inline_get_type_error.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Cannot return value of type "int" because the function return type is "String". +>> ERROR at line 6: Cannot return value of type "int" because the function return type is "String". diff --git a/modules/gdscript/tests/scripts/analyzer/errors/property_inline_set_type_error.out b/modules/gdscript/tests/scripts/analyzer/errors/property_inline_set_type_error.out index bf776029b98..14df30f719d 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/property_inline_set_type_error.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/property_inline_set_type_error.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Value of type "String" cannot be assigned to a variable of type "int". +>> ERROR at line 6: Value of type "String" cannot be assigned to a variable of type "int". diff --git a/modules/gdscript/tests/scripts/analyzer/errors/property_used_as_function.out b/modules/gdscript/tests/scripts/analyzer/errors/property_used_as_function.out index 94d6c26a1a0..d4118999c53 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/property_used_as_function.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/property_used_as_function.out @@ -1,2 +1,3 @@ GDTEST_ANALYZER_ERROR -Member "property" is not a function. +>> ERROR at line 4: Member "property" is not a function. +>> ERROR at line 4: Name "property" called as a function but is a "int". diff --git a/modules/gdscript/tests/scripts/analyzer/errors/redefine_class_constant.out b/modules/gdscript/tests/scripts/analyzer/errors/redefine_class_constant.out index 5275183da27..49a6a171d5d 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/redefine_class_constant.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/redefine_class_constant.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Cannot assign a new value to a constant. +>> ERROR at line 7: Cannot assign a new value to a constant. diff --git a/modules/gdscript/tests/scripts/analyzer/errors/redefine_local_constant.out b/modules/gdscript/tests/scripts/analyzer/errors/redefine_local_constant.out index 5275183da27..134de681110 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/redefine_local_constant.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/redefine_local_constant.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Cannot assign a new value to a constant. +>> ERROR at line 5: Cannot assign a new value to a constant. diff --git a/modules/gdscript/tests/scripts/analyzer/errors/return_null_in_void_func.out b/modules/gdscript/tests/scripts/analyzer/errors/return_null_in_void_func.out index 3c09f44ba95..8715c79e50d 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/return_null_in_void_func.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/return_null_in_void_func.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -A void function cannot return a value. +>> ERROR at line 2: A void function cannot return a value. diff --git a/modules/gdscript/tests/scripts/analyzer/errors/return_variant_in_void_func.out b/modules/gdscript/tests/scripts/analyzer/errors/return_variant_in_void_func.out index 3c09f44ba95..10ef4832e31 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/return_variant_in_void_func.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/return_variant_in_void_func.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -A void function cannot return a value. +>> ERROR at line 4: A void function cannot return a value. diff --git a/modules/gdscript/tests/scripts/analyzer/errors/script_freed_instance.gd b/modules/gdscript/tests/scripts/analyzer/errors/script_freed_instance.gd deleted file mode 100644 index b0cfdea75da..00000000000 --- a/modules/gdscript/tests/scripts/analyzer/errors/script_freed_instance.gd +++ /dev/null @@ -1,10 +0,0 @@ -class A extends Node: - pass - -func test(): - var x = A.new() - - x.free() - - var ok = x - var bad: A = x diff --git a/modules/gdscript/tests/scripts/analyzer/errors/script_freed_instance.out b/modules/gdscript/tests/scripts/analyzer/errors/script_freed_instance.out deleted file mode 100644 index dec7090322a..00000000000 --- a/modules/gdscript/tests/scripts/analyzer/errors/script_freed_instance.out +++ /dev/null @@ -1,6 +0,0 @@ -GDTEST_RUNTIME_ERROR ->> SCRIPT ERROR ->> on function: test() ->> analyzer/errors/script_freed_instance.gd ->> 10 ->> Trying to assign invalid previously freed instance. diff --git a/modules/gdscript/tests/scripts/analyzer/errors/setter_parameter_uses_property_type.out b/modules/gdscript/tests/scripts/analyzer/errors/setter_parameter_uses_property_type.out index 2857cd53c84..83f939a3fcd 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/setter_parameter_uses_property_type.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/setter_parameter_uses_property_type.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Cannot assign a value of type int to variable "x" with specified type String. +>> ERROR at line 3: Cannot assign a value of type int to variable "x" with specified type String. diff --git a/modules/gdscript/tests/scripts/analyzer/errors/static_constructor_with_return_type.out b/modules/gdscript/tests/scripts/analyzer/errors/static_constructor_with_return_type.out index 42294b7afb1..4a090598840 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/static_constructor_with_return_type.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/static_constructor_with_return_type.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Static constructor cannot have an explicit return type. +>> ERROR at line 1: Static constructor cannot have an explicit return type. diff --git a/modules/gdscript/tests/scripts/analyzer/errors/static_func_access_non_static.out b/modules/gdscript/tests/scripts/analyzer/errors/static_func_access_non_static.out index d8d6c8bc1b7..9356549fdec 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/static_func_access_non_static.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/static_func_access_non_static.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Cannot access non-static function "non_static_func" from the static function "static_func()". +>> ERROR at line 4: Cannot access non-static function "non_static_func" from the static function "static_func()". diff --git a/modules/gdscript/tests/scripts/analyzer/errors/static_func_access_non_static_in_lambda_param.out b/modules/gdscript/tests/scripts/analyzer/errors/static_func_access_non_static_in_lambda_param.out index d8d6c8bc1b7..656b3a162ac 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/static_func_access_non_static_in_lambda_param.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/static_func_access_non_static_in_lambda_param.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Cannot access non-static function "non_static_func" from the static function "static_func()". +>> ERROR at line 9: Cannot access non-static function "non_static_func" from the static function "static_func()". diff --git a/modules/gdscript/tests/scripts/analyzer/errors/static_func_call_non_static.out b/modules/gdscript/tests/scripts/analyzer/errors/static_func_call_non_static.out index c094c08cd8a..c41ce62ae36 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/static_func_call_non_static.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/static_func_call_non_static.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Cannot call non-static function "non_static_func()" from the static function "static_func()". +>> ERROR at line 2: Cannot call non-static function "non_static_func()" from the static function "static_func()". diff --git a/modules/gdscript/tests/scripts/analyzer/errors/static_func_call_non_static_in_lambda.out b/modules/gdscript/tests/scripts/analyzer/errors/static_func_call_non_static_in_lambda.out index c094c08cd8a..ef6a1f0b133 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/static_func_call_non_static_in_lambda.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/static_func_call_non_static_in_lambda.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Cannot call non-static function "non_static_func()" from the static function "static_func()". +>> ERROR at line 9: Cannot call non-static function "non_static_func()" from the static function "static_func()". diff --git a/modules/gdscript/tests/scripts/analyzer/errors/static_func_call_non_static_in_lambda_param.out b/modules/gdscript/tests/scripts/analyzer/errors/static_func_call_non_static_in_lambda_param.out index c094c08cd8a..ef6a1f0b133 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/static_func_call_non_static_in_lambda_param.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/static_func_call_non_static_in_lambda_param.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Cannot call non-static function "non_static_func()" from the static function "static_func()". +>> ERROR at line 9: Cannot call non-static function "non_static_func()" from the static function "static_func()". diff --git a/modules/gdscript/tests/scripts/analyzer/errors/static_var_export_annotation.out b/modules/gdscript/tests/scripts/analyzer/errors/static_var_export_annotation.out index 4111aa07af7..582308aaabb 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/static_var_export_annotation.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/static_var_export_annotation.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Annotation "@export" cannot be applied to a static variable. +>> ERROR at line 5: Annotation "@export" cannot be applied to a static variable. diff --git a/modules/gdscript/tests/scripts/analyzer/errors/static_var_init_access_non_static_in_lambda.out b/modules/gdscript/tests/scripts/analyzer/errors/static_var_init_access_non_static_in_lambda.out index 153e81b4053..18384570d2f 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/static_var_init_access_non_static_in_lambda.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/static_var_init_access_non_static_in_lambda.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Cannot access non-static function "non_static_func" from a static variable initializer. +>> ERROR at line 9: Cannot access non-static function "non_static_func" from a static variable initializer. diff --git a/modules/gdscript/tests/scripts/analyzer/errors/static_var_init_access_non_static_in_lambda_setter.out b/modules/gdscript/tests/scripts/analyzer/errors/static_var_init_access_non_static_in_lambda_setter.out index de43f2d3c44..5fb76390494 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/static_var_init_access_non_static_in_lambda_setter.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/static_var_init_access_non_static_in_lambda_setter.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Cannot access non-static function "non_static_func" from the static function "@static_var_setter()". +>> ERROR at line 10: Cannot access non-static function "non_static_func" from the static function "@static_var_setter()". diff --git a/modules/gdscript/tests/scripts/analyzer/errors/static_var_init_call_non_static_in_lambda.out b/modules/gdscript/tests/scripts/analyzer/errors/static_var_init_call_non_static_in_lambda.out index c0308c81f33..1107a2b73e3 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/static_var_init_call_non_static_in_lambda.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/static_var_init_call_non_static_in_lambda.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Cannot call non-static function "non_static_func()" from a static variable initializer. +>> ERROR at line 9: Cannot call non-static function "non_static_func()" from a static variable initializer. diff --git a/modules/gdscript/tests/scripts/analyzer/errors/static_var_init_call_non_static_in_lambda_setter.out b/modules/gdscript/tests/scripts/analyzer/errors/static_var_init_call_non_static_in_lambda_setter.out index a285b800252..99a6249e533 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/static_var_init_call_non_static_in_lambda_setter.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/static_var_init_call_non_static_in_lambda_setter.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Cannot call non-static function "non_static_func()" from the static function "@static_var_setter()". +>> ERROR at line 10: Cannot call non-static function "non_static_func()" from the static function "@static_var_setter()". diff --git a/modules/gdscript/tests/scripts/analyzer/errors/static_var_init_non_static_access.out b/modules/gdscript/tests/scripts/analyzer/errors/static_var_init_non_static_access.out index a95069dc4f9..7a5875f85d9 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/static_var_init_non_static_access.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/static_var_init_non_static_access.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Cannot access non-static function "non_static" from a static variable initializer. +>> ERROR at line 8: Cannot access non-static function "non_static" from a static variable initializer. diff --git a/modules/gdscript/tests/scripts/analyzer/errors/static_var_init_non_static_call.out b/modules/gdscript/tests/scripts/analyzer/errors/static_var_init_non_static_call.out index 81554ec7074..78dfe4afb4e 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/static_var_init_non_static_call.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/static_var_init_non_static_call.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Cannot call non-static function "non_static()" from a static variable initializer. +>> ERROR at line 6: Cannot call non-static function "non_static()" from a static variable initializer. diff --git a/modules/gdscript/tests/scripts/analyzer/errors/super_nonexistent_base_method.out b/modules/gdscript/tests/scripts/analyzer/errors/super_nonexistent_base_method.out index e3dbf818507..04de9e313de 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/super_nonexistent_base_method.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/super_nonexistent_base_method.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Function "say()" not found in base RefCounted. +>> ERROR at line 4: Function "say()" not found in base RefCounted. diff --git a/modules/gdscript/tests/scripts/analyzer/errors/ternary_weak_infer.out b/modules/gdscript/tests/scripts/analyzer/errors/ternary_weak_infer.out index 71d1e2f8ae8..297911c70da 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/ternary_weak_infer.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/ternary_weak_infer.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Cannot infer the type of "result_hm_int" variable because the value doesn't have a set type. +>> ERROR at line 4: Cannot infer the type of "result_hm_int" variable because the value doesn't have a set type. diff --git a/modules/gdscript/tests/scripts/analyzer/errors/typed_array_assign_differently_typed.out b/modules/gdscript/tests/scripts/analyzer/errors/typed_array_assign_differently_typed.out index c6d39781eee..47a2847ebff 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/typed_array_assign_differently_typed.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/typed_array_assign_differently_typed.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Cannot assign a value of type Array[float] to variable "typed" with specified type Array[int]. +>> ERROR at line 3: Cannot assign a value of type Array[float] to variable "typed" with specified type Array[int]. diff --git a/modules/gdscript/tests/scripts/analyzer/errors/typed_array_assignment.out b/modules/gdscript/tests/scripts/analyzer/errors/typed_array_assignment.out index 8530783673d..38b2727cc2d 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/typed_array_assignment.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/typed_array_assignment.out @@ -1,2 +1,3 @@ GDTEST_ANALYZER_ERROR -Cannot include a value of type "String" as "int". +>> ERROR at line 2: Cannot include a value of type "String" as "int". +>> ERROR at line 2: Cannot have an element of type "String" in an array of type "Array[int]". diff --git a/modules/gdscript/tests/scripts/analyzer/errors/typed_array_init_with_unconvertable_in_literal.out b/modules/gdscript/tests/scripts/analyzer/errors/typed_array_init_with_unconvertable_in_literal.out index dfe34437614..b9884a9d37f 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/typed_array_init_with_unconvertable_in_literal.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/typed_array_init_with_unconvertable_in_literal.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Cannot have an element of type "int" in an array of type "Array[Object]". +>> ERROR at line 3: Cannot have an element of type "int" in an array of type "Array[Object]". diff --git a/modules/gdscript/tests/scripts/analyzer/errors/typed_array_pass_differently_to_typed.out b/modules/gdscript/tests/scripts/analyzer/errors/typed_array_pass_differently_to_typed.out index 297e1283e84..cd6c09a484d 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/typed_array_pass_differently_to_typed.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/typed_array_pass_differently_to_typed.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Invalid argument for "expect_typed()" function: argument 1 should be "Array[int]" but is "Array[float]". +>> ERROR at line 6: Invalid argument for "expect_typed()" function: argument 1 should be "Array[int]" but is "Array[float]". diff --git a/modules/gdscript/tests/scripts/analyzer/errors/typed_dictionary_assign_differently_typed.out b/modules/gdscript/tests/scripts/analyzer/errors/typed_dictionary_assign_differently_typed.out index e05d4be8c93..a9cc45baa6d 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/typed_dictionary_assign_differently_typed.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/typed_dictionary_assign_differently_typed.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Cannot assign a value of type Dictionary[float, float] to variable "typed" with specified type Dictionary[int, int]. +>> ERROR at line 3: Cannot assign a value of type Dictionary[float, float] to variable "typed" with specified type Dictionary[int, int]. diff --git a/modules/gdscript/tests/scripts/analyzer/errors/typed_dictionary_assignment.out b/modules/gdscript/tests/scripts/analyzer/errors/typed_dictionary_assignment.out index 8530783673d..96ee8d3687e 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/typed_dictionary_assignment.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/typed_dictionary_assignment.out @@ -1,2 +1,3 @@ GDTEST_ANALYZER_ERROR -Cannot include a value of type "String" as "int". +>> ERROR at line 2: Cannot include a value of type "String" as "int". +>> ERROR at line 2: Cannot have a key of type "String" in a dictionary of type "Dictionary[int, int]". diff --git a/modules/gdscript/tests/scripts/analyzer/errors/typed_dictionary_init_with_unconvertible_in_literal.out b/modules/gdscript/tests/scripts/analyzer/errors/typed_dictionary_init_with_unconvertible_in_literal.out index 9d6c9d9144b..7a36ca7ebd5 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/typed_dictionary_init_with_unconvertible_in_literal.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/typed_dictionary_init_with_unconvertible_in_literal.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Cannot have a key of type "int" in a dictionary of type "Dictionary[Object, Object]". +>> ERROR at line 3: Cannot have a key of type "int" in a dictionary of type "Dictionary[Object, Object]". diff --git a/modules/gdscript/tests/scripts/analyzer/errors/typed_dictionary_pass_differently_to_typed.out b/modules/gdscript/tests/scripts/analyzer/errors/typed_dictionary_pass_differently_to_typed.out index 302109cf8a5..4c9b985f9bc 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/typed_dictionary_pass_differently_to_typed.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/typed_dictionary_pass_differently_to_typed.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Invalid argument for "expect_typed()" function: argument 1 should be "Dictionary[int, int]" but is "Dictionary[float, float]". +>> ERROR at line 6: Invalid argument for "expect_typed()" function: argument 1 should be "Dictionary[int, int]" but is "Dictionary[float, float]". diff --git a/modules/gdscript/tests/scripts/analyzer/errors/use_value_of_void_function_builtin_method.out b/modules/gdscript/tests/scripts/analyzer/errors/use_value_of_void_function_builtin_method.out index 225c85e9c7d..78ae8f7ccc1 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/use_value_of_void_function_builtin_method.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/use_value_of_void_function_builtin_method.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Cannot get return value of call to "reverse()" because it returns "void". +>> ERROR at line 3: Cannot get return value of call to "reverse()" because it returns "void". diff --git a/modules/gdscript/tests/scripts/analyzer/errors/use_value_of_void_function_custom_method.out b/modules/gdscript/tests/scripts/analyzer/errors/use_value_of_void_function_custom_method.out index 2b1a6078832..124efa307d3 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/use_value_of_void_function_custom_method.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/use_value_of_void_function_custom_method.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Cannot get return value of call to "foo()" because it returns "void". +>> ERROR at line 5: Cannot get return value of call to "foo()" because it returns "void". diff --git a/modules/gdscript/tests/scripts/analyzer/errors/use_value_of_void_function_gd_utility.out b/modules/gdscript/tests/scripts/analyzer/errors/use_value_of_void_function_gd_utility.out index 502c18ab9db..1af3a0ceb55 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/use_value_of_void_function_gd_utility.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/use_value_of_void_function_gd_utility.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Cannot get return value of call to "print_debug()" because it returns "void". +>> ERROR at line 2: Cannot get return value of call to "print_debug()" because it returns "void". diff --git a/modules/gdscript/tests/scripts/analyzer/errors/use_value_of_void_function_native_method.out b/modules/gdscript/tests/scripts/analyzer/errors/use_value_of_void_function_native_method.out index 88be39345b4..b5857adf077 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/use_value_of_void_function_native_method.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/use_value_of_void_function_native_method.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Cannot get return value of call to "free()" because it returns "void". +>> ERROR at line 3: Cannot get return value of call to "free()" because it returns "void". diff --git a/modules/gdscript/tests/scripts/analyzer/errors/use_value_of_void_function_utility.out b/modules/gdscript/tests/scripts/analyzer/errors/use_value_of_void_function_utility.out index ebf43186be9..9bdd3c3d2b6 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/use_value_of_void_function_utility.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/use_value_of_void_function_utility.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Cannot get return value of call to "print()" because it returns "void". +>> ERROR at line 2: Cannot get return value of call to "print()" because it returns "void". diff --git a/modules/gdscript/tests/scripts/analyzer/errors/utility_function_wrong_arg.out b/modules/gdscript/tests/scripts/analyzer/errors/utility_function_wrong_arg.out index 27d2504dd06..6369a33cd49 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/utility_function_wrong_arg.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/utility_function_wrong_arg.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Invalid argument for "floor()" function: Argument "x" must be "int", "float", "Vector2", "Vector2i", "Vector3", "Vector3i", "Vector4", or "Vector4i". +>> ERROR at line 2: Invalid argument for "floor()" function: Argument "x" must be "int", "float", "Vector2", "Vector2i", "Vector3", "Vector3i", "Vector4", or "Vector4i". diff --git a/modules/gdscript/tests/scripts/analyzer/errors/variable_name_shadows_builtin_type.out b/modules/gdscript/tests/scripts/analyzer/errors/variable_name_shadows_builtin_type.out index 87863baf758..ce8d9807b2f 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/variable_name_shadows_builtin_type.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/variable_name_shadows_builtin_type.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -The member "Vector2" cannot have the same name as a builtin type. +>> ERROR at line 1: The member "Vector2" cannot have the same name as a builtin type. diff --git a/modules/gdscript/tests/scripts/analyzer/errors/variable_overloads_superclass_function.out b/modules/gdscript/tests/scripts/analyzer/errors/variable_overloads_superclass_function.out index 32357f9f6af..03d55aa52ef 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/variable_overloads_superclass_function.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/variable_overloads_superclass_function.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -The member "overload_me" already exists in parent class A. +>> ERROR at line 9: The member "overload_me" already exists in parent class A. diff --git a/modules/gdscript/tests/scripts/analyzer/errors/virtual_super_not_implemented.out b/modules/gdscript/tests/scripts/analyzer/errors/virtual_super_not_implemented.out index e68759223c5..a1db69fee04 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/virtual_super_not_implemented.out +++ b/modules/gdscript/tests/scripts/analyzer/errors/virtual_super_not_implemented.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Cannot call the parent class' virtual function "_init()" because it hasn't been defined. +>> ERROR at line 2: Cannot call the parent class' virtual function "_init()" because it hasn't been defined. diff --git a/modules/gdscript/tests/scripts/analyzer/features/allow_void_function_to_return_void.out b/modules/gdscript/tests/scripts/analyzer/features/allow_void_function_to_return_void.out index f49d93620f2..e3933bd5f2c 100644 --- a/modules/gdscript/tests/scripts/analyzer/features/allow_void_function_to_return_void.out +++ b/modules/gdscript/tests/scripts/analyzer/features/allow_void_function_to_return_void.out @@ -1,8 +1,5 @@ GDTEST_OK ->> WARNING ->> Line: 20 ->> UNSAFE_VOID_RETURN ->> The method "return_side_effect()" returns "void" but it's trying to return a call to "side_effect()" that can't be ensured to also be "void". +~~ WARNING at line 20: (UNSAFE_VOID_RETURN) The method "return_side_effect()" returns "void" but it's trying to return a call to "side_effect()" that can't be ensured to also be "void". hello effect effect diff --git a/modules/gdscript/tests/scripts/analyzer/features/auto_inferred_type_dont_error.out b/modules/gdscript/tests/scripts/analyzer/features/auto_inferred_type_dont_error.out index 22cd5d3a177..100961ee1d0 100644 --- a/modules/gdscript/tests/scripts/analyzer/features/auto_inferred_type_dont_error.out +++ b/modules/gdscript/tests/scripts/analyzer/features/auto_inferred_type_dont_error.out @@ -1,6 +1,3 @@ GDTEST_OK ->> WARNING ->> Line: 6 ->> UNSAFE_METHOD_ACCESS ->> The method "free()" is not present on the inferred type "Variant" (but may be present on a subtype). +~~ WARNING at line 6: (UNSAFE_METHOD_ACCESS) The method "free()" is not present on the inferred type "Variant" (but may be present on a subtype). Ok diff --git a/modules/gdscript/tests/scripts/analyzer/features/warning_ignore_targets.out b/modules/gdscript/tests/scripts/analyzer/features/warning_ignore_targets.out index 032af0322be..bf870408111 100644 --- a/modules/gdscript/tests/scripts/analyzer/features/warning_ignore_targets.out +++ b/modules/gdscript/tests/scripts/analyzer/features/warning_ignore_targets.out @@ -1,29 +1,8 @@ GDTEST_OK ->> WARNING ->> Line: 3 ->> CONFUSABLE_IDENTIFIER ->> The identifier "my_vАr" has misleading characters and might be confused with something else. ->> WARNING ->> Line: 8 ->> NARROWING_CONVERSION ->> Narrowing conversion (float is converted to int and loses precision). ->> WARNING ->> Line: 19 ->> NARROWING_CONVERSION ->> Narrowing conversion (float is converted to int and loses precision). ->> WARNING ->> Line: 24 ->> NARROWING_CONVERSION ->> Narrowing conversion (float is converted to int and loses precision). ->> WARNING ->> Line: 27 ->> CONFUSABLE_IDENTIFIER ->> The identifier "_my_vАr" has misleading characters and might be confused with something else. ->> WARNING ->> Line: 31 ->> NARROWING_CONVERSION ->> Narrowing conversion (float is converted to int and loses precision). ->> WARNING ->> Line: 35 ->> NARROWING_CONVERSION ->> Narrowing conversion (float is converted to int and loses precision). +~~ WARNING at line 3: (CONFUSABLE_IDENTIFIER) The identifier "my_vАr" has misleading characters and might be confused with something else. +~~ WARNING at line 8: (NARROWING_CONVERSION) Narrowing conversion (float is converted to int and loses precision). +~~ WARNING at line 19: (NARROWING_CONVERSION) Narrowing conversion (float is converted to int and loses precision). +~~ WARNING at line 24: (NARROWING_CONVERSION) Narrowing conversion (float is converted to int and loses precision). +~~ WARNING at line 27: (CONFUSABLE_IDENTIFIER) The identifier "_my_vАr" has misleading characters and might be confused with something else. +~~ WARNING at line 31: (NARROWING_CONVERSION) Narrowing conversion (float is converted to int and loses precision). +~~ WARNING at line 35: (NARROWING_CONVERSION) Narrowing conversion (float is converted to int and loses precision). diff --git a/modules/gdscript/tests/scripts/analyzer/warnings/cast_enum_bad_enum.out b/modules/gdscript/tests/scripts/analyzer/warnings/cast_enum_bad_enum.out index 6d8aeaf0b65..5c8de735056 100644 --- a/modules/gdscript/tests/scripts/analyzer/warnings/cast_enum_bad_enum.out +++ b/modules/gdscript/tests/scripts/analyzer/warnings/cast_enum_bad_enum.out @@ -1,6 +1,3 @@ GDTEST_OK ->> WARNING ->> Line: 5 ->> INT_AS_ENUM_WITHOUT_MATCH ->> Cannot cast 2 as Enum "cast_enum_bad_enum.gd.MyEnum": no enum member has matching value. +~~ WARNING at line 5: (INT_AS_ENUM_WITHOUT_MATCH) Cannot cast 2 as Enum "cast_enum_bad_enum.gd.MyEnum": no enum member has matching value. 2 diff --git a/modules/gdscript/tests/scripts/analyzer/warnings/cast_enum_bad_int.out b/modules/gdscript/tests/scripts/analyzer/warnings/cast_enum_bad_int.out index b0e4af29a09..420b57f87ab 100644 --- a/modules/gdscript/tests/scripts/analyzer/warnings/cast_enum_bad_int.out +++ b/modules/gdscript/tests/scripts/analyzer/warnings/cast_enum_bad_int.out @@ -1,6 +1,3 @@ GDTEST_OK ->> WARNING ->> Line: 4 ->> INT_AS_ENUM_WITHOUT_MATCH ->> Cannot cast 2 as Enum "cast_enum_bad_int.gd.MyEnum": no enum member has matching value. +~~ WARNING at line 4: (INT_AS_ENUM_WITHOUT_MATCH) Cannot cast 2 as Enum "cast_enum_bad_int.gd.MyEnum": no enum member has matching value. 2 diff --git a/modules/gdscript/tests/scripts/analyzer/warnings/confusable_capture_reassignment.out b/modules/gdscript/tests/scripts/analyzer/warnings/confusable_capture_reassignment.out index e6a1cab77d6..2a28bf6a972 100644 --- a/modules/gdscript/tests/scripts/analyzer/warnings/confusable_capture_reassignment.out +++ b/modules/gdscript/tests/scripts/analyzer/warnings/confusable_capture_reassignment.out @@ -1,19 +1,7 @@ GDTEST_OK ->> WARNING ->> Line: 13 ->> CONFUSABLE_CAPTURE_REASSIGNMENT ->> Reassigning lambda capture does not modify the outer local variable "number". ->> WARNING ->> Line: 14 ->> CONFUSABLE_CAPTURE_REASSIGNMENT ->> Reassigning lambda capture does not modify the outer local variable "string". ->> WARNING ->> Line: 15 ->> CONFUSABLE_CAPTURE_REASSIGNMENT ->> Reassigning lambda capture does not modify the outer local variable "vector". ->> WARNING ->> Line: 16 ->> CONFUSABLE_CAPTURE_REASSIGNMENT ->> Reassigning lambda capture does not modify the outer local variable "array_assign". +~~ WARNING at line 13: (CONFUSABLE_CAPTURE_REASSIGNMENT) Reassigning lambda capture does not modify the outer local variable "number". +~~ WARNING at line 14: (CONFUSABLE_CAPTURE_REASSIGNMENT) Reassigning lambda capture does not modify the outer local variable "string". +~~ WARNING at line 15: (CONFUSABLE_CAPTURE_REASSIGNMENT) Reassigning lambda capture does not modify the outer local variable "vector". +~~ WARNING at line 16: (CONFUSABLE_CAPTURE_REASSIGNMENT) Reassigning lambda capture does not modify the outer local variable "array_assign". lambda 2 2 12 (2, 0) [2] [2] { &"x": 2 } outer 2 1 1 (1, 0) [1] [2] { &"x": 2 } diff --git a/modules/gdscript/tests/scripts/analyzer/warnings/confusable_local_declaration.out b/modules/gdscript/tests/scripts/analyzer/warnings/confusable_local_declaration.out index 7365072ea73..0e4c4388bba 100644 --- a/modules/gdscript/tests/scripts/analyzer/warnings/confusable_local_declaration.out +++ b/modules/gdscript/tests/scripts/analyzer/warnings/confusable_local_declaration.out @@ -1,7 +1,4 @@ GDTEST_OK ->> WARNING ->> Line: 3 ->> CONFUSABLE_LOCAL_DECLARATION ->> The variable "a" is declared below in the parent block. +~~ WARNING at line 3: (CONFUSABLE_LOCAL_DECLARATION) The variable "a" is declared below in the parent block. 1 2 diff --git a/modules/gdscript/tests/scripts/analyzer/warnings/confusable_local_usage.out b/modules/gdscript/tests/scripts/analyzer/warnings/confusable_local_usage.out index cfe91e00bde..85bc44a05d8 100644 --- a/modules/gdscript/tests/scripts/analyzer/warnings/confusable_local_usage.out +++ b/modules/gdscript/tests/scripts/analyzer/warnings/confusable_local_usage.out @@ -1,11 +1,5 @@ GDTEST_OK ->> WARNING ->> Line: 4 ->> CONFUSABLE_LOCAL_USAGE ->> The identifier "a" will be shadowed below in the block. ->> WARNING ->> Line: 5 ->> SHADOWED_VARIABLE ->> The local variable "a" is shadowing an already-declared variable at line 1 in the current class. +~~ WARNING at line 4: (CONFUSABLE_LOCAL_USAGE) The identifier "a" will be shadowed below in the block. +~~ WARNING at line 5: (SHADOWED_VARIABLE) The local variable "a" is shadowing an already-declared variable at line 1 in the current class. 1 2 diff --git a/modules/gdscript/tests/scripts/analyzer/warnings/confusable_local_usage_initializer.out b/modules/gdscript/tests/scripts/analyzer/warnings/confusable_local_usage_initializer.out index ae0f2d8b8be..953ed8e209b 100644 --- a/modules/gdscript/tests/scripts/analyzer/warnings/confusable_local_usage_initializer.out +++ b/modules/gdscript/tests/scripts/analyzer/warnings/confusable_local_usage_initializer.out @@ -1,15 +1,6 @@ GDTEST_OK ->> WARNING ->> Line: 4 ->> CONFUSABLE_LOCAL_USAGE ->> The identifier "a" will be shadowed below in the block. ->> WARNING ->> Line: 5 ->> CONFUSABLE_LOCAL_USAGE ->> The identifier "a" will be shadowed below in the block. ->> WARNING ->> Line: 5 ->> SHADOWED_VARIABLE ->> The local variable "a" is shadowing an already-declared variable at line 1 in the current class. +~~ WARNING at line 4: (CONFUSABLE_LOCAL_USAGE) The identifier "a" will be shadowed below in the block. +~~ WARNING at line 5: (CONFUSABLE_LOCAL_USAGE) The identifier "a" will be shadowed below in the block. +~~ WARNING at line 5: (SHADOWED_VARIABLE) The local variable "a" is shadowing an already-declared variable at line 1 in the current class. 1 2 diff --git a/modules/gdscript/tests/scripts/analyzer/warnings/confusable_local_usage_loop.out b/modules/gdscript/tests/scripts/analyzer/warnings/confusable_local_usage_loop.out index 101d27df9d1..68a6b71532c 100644 --- a/modules/gdscript/tests/scripts/analyzer/warnings/confusable_local_usage_loop.out +++ b/modules/gdscript/tests/scripts/analyzer/warnings/confusable_local_usage_loop.out @@ -1,12 +1,6 @@ GDTEST_OK ->> WARNING ->> Line: 5 ->> CONFUSABLE_LOCAL_USAGE ->> The identifier "a" will be shadowed below in the block. ->> WARNING ->> Line: 6 ->> SHADOWED_VARIABLE ->> The local variable "a" is shadowing an already-declared variable at line 1 in the current class. +~~ WARNING at line 5: (CONFUSABLE_LOCAL_USAGE) The identifier "a" will be shadowed below in the block. +~~ WARNING at line 6: (SHADOWED_VARIABLE) The local variable "a" is shadowing an already-declared variable at line 1 in the current class. 1 2 1 diff --git a/modules/gdscript/tests/scripts/analyzer/warnings/enum_without_default_value.out b/modules/gdscript/tests/scripts/analyzer/warnings/enum_without_default_value.out index ae40e0bc8c5..3847cdef216 100644 --- a/modules/gdscript/tests/scripts/analyzer/warnings/enum_without_default_value.out +++ b/modules/gdscript/tests/scripts/analyzer/warnings/enum_without_default_value.out @@ -1,7 +1,4 @@ GDTEST_OK ->> WARNING ->> Line: 4 ->> ENUM_VARIABLE_WITHOUT_DEFAULT ->> The variable "has_no_zero" has an enum type and does not set an explicit default value. The default will be set to "0". +~~ WARNING at line 4: (ENUM_VARIABLE_WITHOUT_DEFAULT) The variable "has_no_zero" has an enum type and does not set an explicit default value. The default will be set to "0". 0 0 diff --git a/modules/gdscript/tests/scripts/analyzer/warnings/get_node_without_onready.out b/modules/gdscript/tests/scripts/analyzer/warnings/get_node_without_onready.out index 62b3ae291fd..ad92088a127 100644 --- a/modules/gdscript/tests/scripts/analyzer/warnings/get_node_without_onready.out +++ b/modules/gdscript/tests/scripts/analyzer/warnings/get_node_without_onready.out @@ -1,22 +1,7 @@ GDTEST_OK ->> WARNING ->> Line: 5 ->> GET_NODE_DEFAULT_WITHOUT_ONREADY ->> The default value is using "$" which won't return nodes in the scene tree before "_ready()" is called. Use the "@onready" annotation to solve this. ->> WARNING ->> Line: 6 ->> GET_NODE_DEFAULT_WITHOUT_ONREADY ->> The default value is using "get_node()" which won't return nodes in the scene tree before "_ready()" is called. Use the "@onready" annotation to solve this. ->> WARNING ->> Line: 7 ->> GET_NODE_DEFAULT_WITHOUT_ONREADY ->> The default value is using "get_node()" which won't return nodes in the scene tree before "_ready()" is called. Use the "@onready" annotation to solve this. ->> WARNING ->> Line: 8 ->> GET_NODE_DEFAULT_WITHOUT_ONREADY ->> The default value is using "get_node()" which won't return nodes in the scene tree before "_ready()" is called. Use the "@onready" annotation to solve this. ->> WARNING ->> Line: 9 ->> GET_NODE_DEFAULT_WITHOUT_ONREADY ->> The default value is using "$" which won't return nodes in the scene tree before "_ready()" is called. Use the "@onready" annotation to solve this. +~~ WARNING at line 5: (GET_NODE_DEFAULT_WITHOUT_ONREADY) The default value is using "$" which won't return nodes in the scene tree before "_ready()" is called. Use the "@onready" annotation to solve this. +~~ WARNING at line 6: (GET_NODE_DEFAULT_WITHOUT_ONREADY) The default value is using "get_node()" which won't return nodes in the scene tree before "_ready()" is called. Use the "@onready" annotation to solve this. +~~ WARNING at line 7: (GET_NODE_DEFAULT_WITHOUT_ONREADY) The default value is using "get_node()" which won't return nodes in the scene tree before "_ready()" is called. Use the "@onready" annotation to solve this. +~~ WARNING at line 8: (GET_NODE_DEFAULT_WITHOUT_ONREADY) The default value is using "get_node()" which won't return nodes in the scene tree before "_ready()" is called. Use the "@onready" annotation to solve this. +~~ WARNING at line 9: (GET_NODE_DEFAULT_WITHOUT_ONREADY) The default value is using "$" which won't return nodes in the scene tree before "_ready()" is called. Use the "@onready" annotation to solve this. warn diff --git a/modules/gdscript/tests/scripts/analyzer/warnings/inference_with_variant.out b/modules/gdscript/tests/scripts/analyzer/warnings/inference_with_variant.out index 1d4078d2f76..e60ebf123e1 100644 --- a/modules/gdscript/tests/scripts/analyzer/warnings/inference_with_variant.out +++ b/modules/gdscript/tests/scripts/analyzer/warnings/inference_with_variant.out @@ -1,6 +1,3 @@ GDTEST_OK ->> WARNING ->> Line: 2 ->> INFERENCE_ON_VARIANT ->> The variable type is being inferred from a Variant value, so it will be typed as Variant. +~~ WARNING at line 2: (INFERENCE_ON_VARIANT) The variable type is being inferred from a Variant value, so it will be typed as Variant. warn diff --git a/modules/gdscript/tests/scripts/analyzer/warnings/lambda_shadowing_arg.out b/modules/gdscript/tests/scripts/analyzer/warnings/lambda_shadowing_arg.out index 5d059b91937..b3b2b223f9e 100644 --- a/modules/gdscript/tests/scripts/analyzer/warnings/lambda_shadowing_arg.out +++ b/modules/gdscript/tests/scripts/analyzer/warnings/lambda_shadowing_arg.out @@ -1,6 +1,3 @@ GDTEST_OK ->> WARNING ->> Line: 4 ->> SHADOWED_VARIABLE ->> The local function parameter "shadow" is shadowing an already-declared variable at line 1 in the current class. +~~ WARNING at line 4: (SHADOWED_VARIABLE) The local function parameter "shadow" is shadowing an already-declared variable at line 1 in the current class. shadow diff --git a/modules/gdscript/tests/scripts/analyzer/warnings/lambda_unused_arg.out b/modules/gdscript/tests/scripts/analyzer/warnings/lambda_unused_arg.out index fe6083c329a..40296d2454d 100644 --- a/modules/gdscript/tests/scripts/analyzer/warnings/lambda_unused_arg.out +++ b/modules/gdscript/tests/scripts/analyzer/warnings/lambda_unused_arg.out @@ -1,5 +1,2 @@ GDTEST_OK ->> WARNING ->> Line: 2 ->> UNUSED_PARAMETER ->> The parameter "unused" is never used in the function "()". If this is intended, prefix it with an underscore: "_unused". +~~ WARNING at line 2: (UNUSED_PARAMETER) The parameter "unused" is never used in the function "()". If this is intended, prefix it with an underscore: "_unused". diff --git a/modules/gdscript/tests/scripts/analyzer/warnings/non_tool_extends_tool.out b/modules/gdscript/tests/scripts/analyzer/warnings/non_tool_extends_tool.out index f65caf52227..f4381b6d7b2 100644 --- a/modules/gdscript/tests/scripts/analyzer/warnings/non_tool_extends_tool.out +++ b/modules/gdscript/tests/scripts/analyzer/warnings/non_tool_extends_tool.out @@ -1,9 +1,3 @@ GDTEST_OK ->> WARNING ->> Line: 1 ->> MISSING_TOOL ->> The base class script has the "@tool" annotation, but this script does not have it. ->> WARNING ->> Line: 3 ->> MISSING_TOOL ->> The base class script has the "@tool" annotation, but this script does not have it. +~~ WARNING at line 1: (MISSING_TOOL) The base class script has the "@tool" annotation, but this script does not have it. +~~ WARNING at line 3: (MISSING_TOOL) The base class script has the "@tool" annotation, but this script does not have it. diff --git a/modules/gdscript/tests/scripts/analyzer/warnings/onready_with_export.out b/modules/gdscript/tests/scripts/analyzer/warnings/onready_with_export.out index f861d52f2b0..c65cec17efc 100644 --- a/modules/gdscript/tests/scripts/analyzer/warnings/onready_with_export.out +++ b/modules/gdscript/tests/scripts/analyzer/warnings/onready_with_export.out @@ -1,6 +1,3 @@ GDTEST_OK ->> WARNING ->> Line: 3 ->> ONREADY_WITH_EXPORT ->> "@onready" will set the default value after "@export" takes effect and will override it. +~~ WARNING at line 3: (ONREADY_WITH_EXPORT) "@onready" will set the default value after "@export" takes effect and will override it. warn diff --git a/modules/gdscript/tests/scripts/analyzer/warnings/overriding_native_method.out b/modules/gdscript/tests/scripts/analyzer/warnings/overriding_native_method.out index c76950179de..75fb45cf12f 100644 --- a/modules/gdscript/tests/scripts/analyzer/warnings/overriding_native_method.out +++ b/modules/gdscript/tests/scripts/analyzer/warnings/overriding_native_method.out @@ -1,6 +1,3 @@ GDTEST_OK ->> WARNING ->> Line: 4 ->> NATIVE_METHOD_OVERRIDE ->> The method "get()" overrides a method from native class "Object". This won't be called by the engine and may not work as expected. +~~ WARNING at line 4: (NATIVE_METHOD_OVERRIDE) The method "get()" overrides a method from native class "Object". This won't be called by the engine and may not work as expected. warn diff --git a/modules/gdscript/tests/scripts/analyzer/warnings/redundant_await.out b/modules/gdscript/tests/scripts/analyzer/warnings/redundant_await.out index 3d251c29062..f161897c5b0 100644 --- a/modules/gdscript/tests/scripts/analyzer/warnings/redundant_await.out +++ b/modules/gdscript/tests/scripts/analyzer/warnings/redundant_await.out @@ -1,37 +1,10 @@ GDTEST_OK ->> WARNING ->> Line: 26 ->> REDUNDANT_AWAIT ->> "await" keyword not needed in this case, because the expression isn't a coroutine nor a signal. ->> WARNING ->> Line: 28 ->> REDUNDANT_AWAIT ->> "await" keyword not needed in this case, because the expression isn't a coroutine nor a signal. ->> WARNING ->> Line: 32 ->> REDUNDANT_AWAIT ->> "await" keyword not needed in this case, because the expression isn't a coroutine nor a signal. ->> WARNING ->> Line: 38 ->> REDUNDANT_AWAIT ->> "await" keyword not needed in this case, because the expression isn't a coroutine nor a signal. ->> WARNING ->> Line: 44 ->> REDUNDANT_AWAIT ->> "await" keyword not needed in this case, because the expression isn't a coroutine nor a signal. ->> WARNING ->> Line: 45 ->> REDUNDANT_AWAIT ->> "await" keyword not needed in this case, because the expression isn't a coroutine nor a signal. ->> WARNING ->> Line: 46 ->> REDUNDANT_AWAIT ->> "await" keyword not needed in this case, because the expression isn't a coroutine nor a signal. ->> WARNING ->> Line: 51 ->> REDUNDANT_AWAIT ->> "await" keyword not needed in this case, because the expression isn't a coroutine nor a signal. ->> WARNING ->> Line: 53 ->> REDUNDANT_AWAIT ->> "await" keyword not needed in this case, because the expression isn't a coroutine nor a signal. +~~ WARNING at line 26: (REDUNDANT_AWAIT) "await" keyword not needed in this case, because the expression isn't a coroutine nor a signal. +~~ WARNING at line 28: (REDUNDANT_AWAIT) "await" keyword not needed in this case, because the expression isn't a coroutine nor a signal. +~~ WARNING at line 32: (REDUNDANT_AWAIT) "await" keyword not needed in this case, because the expression isn't a coroutine nor a signal. +~~ WARNING at line 38: (REDUNDANT_AWAIT) "await" keyword not needed in this case, because the expression isn't a coroutine nor a signal. +~~ WARNING at line 44: (REDUNDANT_AWAIT) "await" keyword not needed in this case, because the expression isn't a coroutine nor a signal. +~~ WARNING at line 45: (REDUNDANT_AWAIT) "await" keyword not needed in this case, because the expression isn't a coroutine nor a signal. +~~ WARNING at line 46: (REDUNDANT_AWAIT) "await" keyword not needed in this case, because the expression isn't a coroutine nor a signal. +~~ WARNING at line 51: (REDUNDANT_AWAIT) "await" keyword not needed in this case, because the expression isn't a coroutine nor a signal. +~~ WARNING at line 53: (REDUNDANT_AWAIT) "await" keyword not needed in this case, because the expression isn't a coroutine nor a signal. diff --git a/modules/gdscript/tests/scripts/analyzer/warnings/shadowning.out b/modules/gdscript/tests/scripts/analyzer/warnings/shadowning.out index 075f5d32250..0b11103a801 100644 --- a/modules/gdscript/tests/scripts/analyzer/warnings/shadowning.out +++ b/modules/gdscript/tests/scripts/analyzer/warnings/shadowning.out @@ -1,46 +1,13 @@ GDTEST_OK ->> WARNING ->> Line: 6 ->> SHADOWED_GLOBAL_IDENTIFIER ->> The variable "print_debug" has the same name as a built-in function. ->> WARNING ->> Line: 13 ->> SHADOWED_GLOBAL_IDENTIFIER ->> The variable "Array" has the same name as a built-in type. ->> WARNING ->> Line: 14 ->> SHADOWED_GLOBAL_IDENTIFIER ->> The variable "Node" has the same name as a native class. ->> WARNING ->> Line: 15 ->> SHADOWED_GLOBAL_IDENTIFIER ->> The variable "is_same" has the same name as a built-in function. ->> WARNING ->> Line: 16 ->> SHADOWED_GLOBAL_IDENTIFIER ->> The variable "sqrt" has the same name as a built-in function. ->> WARNING ->> Line: 17 ->> SHADOWED_VARIABLE ->> The local variable "member" is shadowing an already-declared variable at line 4 in the current class. ->> WARNING ->> Line: 18 ->> SHADOWED_VARIABLE_BASE_CLASS ->> The local variable "reference" is shadowing an already-declared method in the base class "RefCounted". ->> WARNING ->> Line: 19 ->> SHADOWED_GLOBAL_IDENTIFIER ->> The variable "ShadowedClass" has the same name as a global class defined in "shadowning.gd". ->> WARNING ->> Line: 20 ->> SHADOWED_VARIABLE_BASE_CLASS ->> The local variable "base_variable_member" is shadowing an already-declared variable at line 4 in the base class "ShadowingBase". ->> WARNING ->> Line: 21 ->> SHADOWED_VARIABLE_BASE_CLASS ->> The local constant "base_function_member" is shadowing an already-declared function at line 6 in the base class "ShadowingBase". ->> WARNING ->> Line: 22 ->> SHADOWED_VARIABLE_BASE_CLASS ->> The local variable "base_const_member" is shadowing an already-declared constant at line 3 in the base class "ShadowingBase". +~~ WARNING at line 6: (SHADOWED_GLOBAL_IDENTIFIER) The variable "print_debug" has the same name as a built-in function. +~~ WARNING at line 13: (SHADOWED_GLOBAL_IDENTIFIER) The variable "Array" has the same name as a built-in type. +~~ WARNING at line 14: (SHADOWED_GLOBAL_IDENTIFIER) The variable "Node" has the same name as a native class. +~~ WARNING at line 15: (SHADOWED_GLOBAL_IDENTIFIER) The variable "is_same" has the same name as a built-in function. +~~ WARNING at line 16: (SHADOWED_GLOBAL_IDENTIFIER) The variable "sqrt" has the same name as a built-in function. +~~ WARNING at line 17: (SHADOWED_VARIABLE) The local variable "member" is shadowing an already-declared variable at line 4 in the current class. +~~ WARNING at line 18: (SHADOWED_VARIABLE_BASE_CLASS) The local variable "reference" is shadowing an already-declared method in the base class "RefCounted". +~~ WARNING at line 19: (SHADOWED_GLOBAL_IDENTIFIER) The variable "ShadowedClass" has the same name as a global class defined in "shadowning.gd". +~~ WARNING at line 20: (SHADOWED_VARIABLE_BASE_CLASS) The local variable "base_variable_member" is shadowing an already-declared variable at line 4 in the base class "ShadowingBase". +~~ WARNING at line 21: (SHADOWED_VARIABLE_BASE_CLASS) The local constant "base_function_member" is shadowing an already-declared function at line 6 in the base class "ShadowingBase". +~~ WARNING at line 22: (SHADOWED_VARIABLE_BASE_CLASS) The local variable "base_const_member" is shadowing an already-declared constant at line 3 in the base class "ShadowingBase". warn diff --git a/modules/gdscript/tests/scripts/analyzer/warnings/unsafe_call_argument.out b/modules/gdscript/tests/scripts/analyzer/warnings/unsafe_call_argument.out index 30845152335..a28e08548d2 100644 --- a/modules/gdscript/tests/scripts/analyzer/warnings/unsafe_call_argument.out +++ b/modules/gdscript/tests/scripts/analyzer/warnings/unsafe_call_argument.out @@ -1,57 +1,15 @@ GDTEST_OK ->> WARNING ->> Line: 28 ->> UNSAFE_CALL_ARGUMENT ->> The argument 1 of the function "int_func()" requires the subtype "int" but the supertype "Variant" was provided. ->> WARNING ->> Line: 29 ->> UNSAFE_CALL_ARGUMENT ->> The argument 1 of the function "int_func()" requires the subtype "int" but the supertype "Variant" was provided. ->> WARNING ->> Line: 30 ->> UNSAFE_CALL_ARGUMENT ->> The argument 1 of the function "int_func()" requires the subtype "int" but the supertype "Variant" was provided. ->> WARNING ->> Line: 31 ->> UNSAFE_CALL_ARGUMENT ->> The argument 1 of the function "int_func()" requires the subtype "int" but the supertype "Variant" was provided. ->> WARNING ->> Line: 34 ->> UNSAFE_CALL_ARGUMENT ->> The argument 1 of the function "float_func()" requires the subtype "float" but the supertype "Variant" was provided. ->> WARNING ->> Line: 35 ->> UNSAFE_CALL_ARGUMENT ->> The argument 1 of the function "float_func()" requires the subtype "float" but the supertype "Variant" was provided. ->> WARNING ->> Line: 36 ->> UNSAFE_CALL_ARGUMENT ->> The argument 1 of the function "float_func()" requires the subtype "float" but the supertype "Variant" was provided. ->> WARNING ->> Line: 37 ->> UNSAFE_CALL_ARGUMENT ->> The argument 1 of the function "float_func()" requires the subtype "float" but the supertype "Variant" was provided. ->> WARNING ->> Line: 40 ->> UNSAFE_CALL_ARGUMENT ->> The argument 1 of the function "node_func()" requires the subtype "Node" but the supertype "Variant" was provided. ->> WARNING ->> Line: 41 ->> UNSAFE_CALL_ARGUMENT ->> The argument 1 of the function "node_func()" requires the subtype "Node" but the supertype "Object" was provided. ->> WARNING ->> Line: 47 ->> UNSAFE_CALL_ARGUMENT ->> The argument 1 of the constructor "Callable()" requires the subtype "Object" but the supertype "Variant" was provided. ->> WARNING ->> Line: 49 ->> UNSAFE_CALL_ARGUMENT ->> The argument 1 of the constructor "Dictionary()" requires the subtype "Dictionary" but the supertype "Variant" was provided. ->> WARNING ->> Line: 50 ->> UNSAFE_CALL_ARGUMENT ->> The argument 1 of the constructor "Vector2()" requires the subtype "Vector2" or "Vector2i" but the supertype "Variant" was provided. ->> WARNING ->> Line: 51 ->> UNSAFE_CALL_ARGUMENT ->> The argument 1 of the constructor "int()" requires the subtype "int", "bool", or "float" but the supertype "Variant" was provided. +~~ WARNING at line 28: (UNSAFE_CALL_ARGUMENT) The argument 1 of the function "int_func()" requires the subtype "int" but the supertype "Variant" was provided. +~~ WARNING at line 29: (UNSAFE_CALL_ARGUMENT) The argument 1 of the function "int_func()" requires the subtype "int" but the supertype "Variant" was provided. +~~ WARNING at line 30: (UNSAFE_CALL_ARGUMENT) The argument 1 of the function "int_func()" requires the subtype "int" but the supertype "Variant" was provided. +~~ WARNING at line 31: (UNSAFE_CALL_ARGUMENT) The argument 1 of the function "int_func()" requires the subtype "int" but the supertype "Variant" was provided. +~~ WARNING at line 34: (UNSAFE_CALL_ARGUMENT) The argument 1 of the function "float_func()" requires the subtype "float" but the supertype "Variant" was provided. +~~ WARNING at line 35: (UNSAFE_CALL_ARGUMENT) The argument 1 of the function "float_func()" requires the subtype "float" but the supertype "Variant" was provided. +~~ WARNING at line 36: (UNSAFE_CALL_ARGUMENT) The argument 1 of the function "float_func()" requires the subtype "float" but the supertype "Variant" was provided. +~~ WARNING at line 37: (UNSAFE_CALL_ARGUMENT) The argument 1 of the function "float_func()" requires the subtype "float" but the supertype "Variant" was provided. +~~ WARNING at line 40: (UNSAFE_CALL_ARGUMENT) The argument 1 of the function "node_func()" requires the subtype "Node" but the supertype "Variant" was provided. +~~ WARNING at line 41: (UNSAFE_CALL_ARGUMENT) The argument 1 of the function "node_func()" requires the subtype "Node" but the supertype "Object" was provided. +~~ WARNING at line 47: (UNSAFE_CALL_ARGUMENT) The argument 1 of the constructor "Callable()" requires the subtype "Object" but the supertype "Variant" was provided. +~~ WARNING at line 49: (UNSAFE_CALL_ARGUMENT) The argument 1 of the constructor "Dictionary()" requires the subtype "Dictionary" but the supertype "Variant" was provided. +~~ WARNING at line 50: (UNSAFE_CALL_ARGUMENT) The argument 1 of the constructor "Vector2()" requires the subtype "Vector2" or "Vector2i" but the supertype "Variant" was provided. +~~ WARNING at line 51: (UNSAFE_CALL_ARGUMENT) The argument 1 of the constructor "int()" requires the subtype "int", "bool", or "float" but the supertype "Variant" was provided. diff --git a/modules/gdscript/tests/scripts/analyzer/warnings/unsafe_cast.out b/modules/gdscript/tests/scripts/analyzer/warnings/unsafe_cast.out index c1e683d942d..73400e46957 100644 --- a/modules/gdscript/tests/scripts/analyzer/warnings/unsafe_cast.out +++ b/modules/gdscript/tests/scripts/analyzer/warnings/unsafe_cast.out @@ -1,33 +1,9 @@ GDTEST_OK ->> WARNING ->> Line: 5 ->> UNSAFE_CAST ->> Casting "Variant" to "int" is unsafe. ->> WARNING ->> Line: 6 ->> UNSAFE_CAST ->> Casting "Variant" to "Node" is unsafe. ->> WARNING ->> Line: 10 ->> UNSAFE_CAST ->> Casting "Variant" to "int" is unsafe. ->> WARNING ->> Line: 11 ->> UNSAFE_CAST ->> Casting "Variant" to "Node" is unsafe. ->> WARNING ->> Line: 15 ->> UNSAFE_CAST ->> Casting "Variant" to "int" is unsafe. ->> WARNING ->> Line: 16 ->> UNSAFE_CAST ->> Casting "Variant" to "Node" is unsafe. ->> WARNING ->> Line: 20 ->> UNSAFE_CAST ->> Casting "Variant" to "int" is unsafe. ->> WARNING ->> Line: 21 ->> UNSAFE_CAST ->> Casting "Variant" to "Node" is unsafe. +~~ WARNING at line 5: (UNSAFE_CAST) Casting "Variant" to "int" is unsafe. +~~ WARNING at line 6: (UNSAFE_CAST) Casting "Variant" to "Node" is unsafe. +~~ WARNING at line 10: (UNSAFE_CAST) Casting "Variant" to "int" is unsafe. +~~ WARNING at line 11: (UNSAFE_CAST) Casting "Variant" to "Node" is unsafe. +~~ WARNING at line 15: (UNSAFE_CAST) Casting "Variant" to "int" is unsafe. +~~ WARNING at line 16: (UNSAFE_CAST) Casting "Variant" to "Node" is unsafe. +~~ WARNING at line 20: (UNSAFE_CAST) Casting "Variant" to "int" is unsafe. +~~ WARNING at line 21: (UNSAFE_CAST) Casting "Variant" to "Node" is unsafe. diff --git a/modules/gdscript/tests/scripts/analyzer/warnings/unused_private_class_variable.out b/modules/gdscript/tests/scripts/analyzer/warnings/unused_private_class_variable.out index c902676a5de..692ec589def 100644 --- a/modules/gdscript/tests/scripts/analyzer/warnings/unused_private_class_variable.out +++ b/modules/gdscript/tests/scripts/analyzer/warnings/unused_private_class_variable.out @@ -1,9 +1,3 @@ GDTEST_OK ->> WARNING ->> Line: 3 ->> UNUSED_PRIVATE_CLASS_VARIABLE ->> The class variable "_a" is declared but never used in the class. ->> WARNING ->> Line: 7 ->> UNUSED_PRIVATE_CLASS_VARIABLE ->> The class variable "_d" is declared but never used in the class. +~~ WARNING at line 3: (UNUSED_PRIVATE_CLASS_VARIABLE) The class variable "_a" is declared but never used in the class. +~~ WARNING at line 7: (UNUSED_PRIVATE_CLASS_VARIABLE) The class variable "_d" is declared but never used in the class. diff --git a/modules/gdscript/tests/scripts/analyzer/warnings/unused_signal.out b/modules/gdscript/tests/scripts/analyzer/warnings/unused_signal.out index 39ddf91c767..177eea2508f 100644 --- a/modules/gdscript/tests/scripts/analyzer/warnings/unused_signal.out +++ b/modules/gdscript/tests/scripts/analyzer/warnings/unused_signal.out @@ -1,9 +1,3 @@ GDTEST_OK ->> WARNING ->> Line: 11 ->> UNUSED_SIGNAL ->> The signal "used_with_dynamic_name" is declared but never explicitly used in the class. ->> WARNING ->> Line: 12 ->> UNUSED_SIGNAL ->> The signal "just_unused" is declared but never explicitly used in the class. +~~ WARNING at line 11: (UNUSED_SIGNAL) The signal "used_with_dynamic_name" is declared but never explicitly used in the class. +~~ WARNING at line 12: (UNUSED_SIGNAL) The signal "just_unused" is declared but never explicitly used in the class. diff --git a/modules/gdscript/tests/scripts/parser/errors/export_enum_wrong_array_type.out b/modules/gdscript/tests/scripts/parser/errors/export_enum_wrong_array_type.out index 1e0455b96d0..91d5aaf0be7 100644 --- a/modules/gdscript/tests/scripts/parser/errors/export_enum_wrong_array_type.out +++ b/modules/gdscript/tests/scripts/parser/errors/export_enum_wrong_array_type.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -"@export_enum" annotation requires a variable of type "int", "Array[int]", "PackedByteArray", "PackedInt32Array", "PackedInt64Array", "String", "Array[String]", or "PackedStringArray", but type "Array[Color]" was given instead. +>> ERROR at line 1: "@export_enum" annotation requires a variable of type "int", "Array[int]", "PackedByteArray", "PackedInt32Array", "PackedInt64Array", "String", "Array[String]", or "PackedStringArray", but type "Array[Color]" was given instead. diff --git a/modules/gdscript/tests/scripts/parser/errors/export_enum_wrong_type.out b/modules/gdscript/tests/scripts/parser/errors/export_enum_wrong_type.out index 43a08acc0ac..79f681177d8 100644 --- a/modules/gdscript/tests/scripts/parser/errors/export_enum_wrong_type.out +++ b/modules/gdscript/tests/scripts/parser/errors/export_enum_wrong_type.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -"@export_enum" annotation requires a variable of type "int", "Array[int]", "PackedByteArray", "PackedInt32Array", "PackedInt64Array", "String", "Array[String]", or "PackedStringArray", but type "Color" was given instead. +>> ERROR at line 1: "@export_enum" annotation requires a variable of type "int", "Array[int]", "PackedByteArray", "PackedInt32Array", "PackedInt64Array", "String", "Array[String]", or "PackedStringArray", but type "Color" was given instead. diff --git a/modules/gdscript/tests/scripts/parser/errors/export_tool_button_requires_tool_mode.out b/modules/gdscript/tests/scripts/parser/errors/export_tool_button_requires_tool_mode.out index fb148308e4b..452e3b7a9de 100644 --- a/modules/gdscript/tests/scripts/parser/errors/export_tool_button_requires_tool_mode.out +++ b/modules/gdscript/tests/scripts/parser/errors/export_tool_button_requires_tool_mode.out @@ -1,2 +1,2 @@ GDTEST_ANALYZER_ERROR -Tool buttons can only be used in tool scripts (add "@tool" to the top of the script). +>> ERROR at line 1: Tool buttons can only be used in tool scripts (add "@tool" to the top of the script). diff --git a/modules/gdscript/tests/scripts/parser/features/match_bind_unused.out b/modules/gdscript/tests/scripts/parser/features/match_bind_unused.out index 44d29cb82dc..ae3437e0bbd 100644 --- a/modules/gdscript/tests/scripts/parser/features/match_bind_unused.out +++ b/modules/gdscript/tests/scripts/parser/features/match_bind_unused.out @@ -1,6 +1,3 @@ GDTEST_OK ->> WARNING ->> Line: 9 ->> UNUSED_VARIABLE ->> The local variable "value" is declared but never used in the block. If this is intended, prefix it with an underscore: "_value". +~~ WARNING at line 9: (UNUSED_VARIABLE) The local variable "value" is declared but never used in the block. If this is intended, prefix it with an underscore: "_value". value diff --git a/modules/gdscript/tests/scripts/parser/features/nested_arithmetic.out b/modules/gdscript/tests/scripts/parser/features/nested_arithmetic.out index 048cfbdfaec..265ffed0f8d 100644 --- a/modules/gdscript/tests/scripts/parser/features/nested_arithmetic.out +++ b/modules/gdscript/tests/scripts/parser/features/nested_arithmetic.out @@ -1,72 +1,21 @@ GDTEST_OK ->> WARNING ->> Line: 19 ->> INTEGER_DIVISION ->> Integer division, decimal part will be discarded. ->> WARNING ->> Line: 19 ->> INTEGER_DIVISION ->> Integer division, decimal part will be discarded. ->> WARNING ->> Line: 19 ->> INTEGER_DIVISION ->> Integer division, decimal part will be discarded. ->> WARNING ->> Line: 19 ->> INTEGER_DIVISION ->> Integer division, decimal part will be discarded. ->> WARNING ->> Line: 19 ->> INTEGER_DIVISION ->> Integer division, decimal part will be discarded. ->> WARNING ->> Line: 19 ->> INTEGER_DIVISION ->> Integer division, decimal part will be discarded. ->> WARNING ->> Line: 19 ->> INTEGER_DIVISION ->> Integer division, decimal part will be discarded. ->> WARNING ->> Line: 19 ->> INTEGER_DIVISION ->> Integer division, decimal part will be discarded. ->> WARNING ->> Line: 19 ->> INTEGER_DIVISION ->> Integer division, decimal part will be discarded. ->> WARNING ->> Line: 19 ->> INTEGER_DIVISION ->> Integer division, decimal part will be discarded. ->> WARNING ->> Line: 19 ->> INTEGER_DIVISION ->> Integer division, decimal part will be discarded. ->> WARNING ->> Line: 19 ->> INTEGER_DIVISION ->> Integer division, decimal part will be discarded. ->> WARNING ->> Line: 19 ->> INTEGER_DIVISION ->> Integer division, decimal part will be discarded. ->> WARNING ->> Line: 19 ->> INTEGER_DIVISION ->> Integer division, decimal part will be discarded. ->> WARNING ->> Line: 19 ->> INTEGER_DIVISION ->> Integer division, decimal part will be discarded. ->> WARNING ->> Line: 19 ->> INTEGER_DIVISION ->> Integer division, decimal part will be discarded. ->> WARNING ->> Line: 19 ->> INTEGER_DIVISION ->> Integer division, decimal part will be discarded. +~~ WARNING at line 19: (INTEGER_DIVISION) Integer division, decimal part will be discarded. +~~ WARNING at line 19: (INTEGER_DIVISION) Integer division, decimal part will be discarded. +~~ WARNING at line 19: (INTEGER_DIVISION) Integer division, decimal part will be discarded. +~~ WARNING at line 19: (INTEGER_DIVISION) Integer division, decimal part will be discarded. +~~ WARNING at line 19: (INTEGER_DIVISION) Integer division, decimal part will be discarded. +~~ WARNING at line 19: (INTEGER_DIVISION) Integer division, decimal part will be discarded. +~~ WARNING at line 19: (INTEGER_DIVISION) Integer division, decimal part will be discarded. +~~ WARNING at line 19: (INTEGER_DIVISION) Integer division, decimal part will be discarded. +~~ WARNING at line 19: (INTEGER_DIVISION) Integer division, decimal part will be discarded. +~~ WARNING at line 19: (INTEGER_DIVISION) Integer division, decimal part will be discarded. +~~ WARNING at line 19: (INTEGER_DIVISION) Integer division, decimal part will be discarded. +~~ WARNING at line 19: (INTEGER_DIVISION) Integer division, decimal part will be discarded. +~~ WARNING at line 19: (INTEGER_DIVISION) Integer division, decimal part will be discarded. +~~ WARNING at line 19: (INTEGER_DIVISION) Integer division, decimal part will be discarded. +~~ WARNING at line 19: (INTEGER_DIVISION) Integer division, decimal part will be discarded. +~~ WARNING at line 19: (INTEGER_DIVISION) Integer division, decimal part will be discarded. +~~ WARNING at line 19: (INTEGER_DIVISION) Integer division, decimal part will be discarded. 2.718 2.718 diff --git a/modules/gdscript/tests/scripts/parser/warnings/assert_always_true.out b/modules/gdscript/tests/scripts/parser/warnings/assert_always_true.out index 5132792cb7a..1f119305947 100644 --- a/modules/gdscript/tests/scripts/parser/warnings/assert_always_true.out +++ b/modules/gdscript/tests/scripts/parser/warnings/assert_always_true.out @@ -1,13 +1,4 @@ GDTEST_OK ->> WARNING ->> Line: 3 ->> ASSERT_ALWAYS_TRUE ->> Assert statement is redundant because the expression is always true. ->> WARNING ->> Line: 4 ->> ASSERT_ALWAYS_TRUE ->> Assert statement is redundant because the expression is always true. ->> WARNING ->> Line: 5 ->> ASSERT_ALWAYS_TRUE ->> Assert statement is redundant because the expression is always true. +~~ WARNING at line 3: (ASSERT_ALWAYS_TRUE) Assert statement is redundant because the expression is always true. +~~ WARNING at line 4: (ASSERT_ALWAYS_TRUE) Assert statement is redundant because the expression is always true. +~~ WARNING at line 5: (ASSERT_ALWAYS_TRUE) Assert statement is redundant because the expression is always true. diff --git a/modules/gdscript/tests/scripts/parser/warnings/confusable_identifier.out b/modules/gdscript/tests/scripts/parser/warnings/confusable_identifier.out index c189204285a..bcdaed34e73 100644 --- a/modules/gdscript/tests/scripts/parser/warnings/confusable_identifier.out +++ b/modules/gdscript/tests/scripts/parser/warnings/confusable_identifier.out @@ -1,10 +1,4 @@ GDTEST_OK ->> WARNING ->> Line: 5 ->> CONFUSABLE_IDENTIFIER ->> The identifier "pοrt" has misleading characters and might be confused with something else. ->> WARNING ->> Line: 12 ->> CONFUSABLE_IDENTIFIER ->> The identifier "pοrt" has misleading characters and might be confused with something else. +~~ WARNING at line 5: (CONFUSABLE_IDENTIFIER) The identifier "pοrt" has misleading characters and might be confused with something else. +~~ WARNING at line 12: (CONFUSABLE_IDENTIFIER) The identifier "pοrt" has misleading characters and might be confused with something else. 0 1 diff --git a/modules/gdscript/tests/scripts/parser/warnings/empty_file.notest.gd b/modules/gdscript/tests/scripts/parser/warnings/empty_file.norun.gd similarity index 100% rename from modules/gdscript/tests/scripts/parser/warnings/empty_file.notest.gd rename to modules/gdscript/tests/scripts/parser/warnings/empty_file.norun.gd diff --git a/modules/gdscript/tests/scripts/parser/warnings/empty_file.norun.out b/modules/gdscript/tests/scripts/parser/warnings/empty_file.norun.out new file mode 100644 index 00000000000..58ef91730e8 --- /dev/null +++ b/modules/gdscript/tests/scripts/parser/warnings/empty_file.norun.out @@ -0,0 +1,2 @@ +GDTEST_OK +~~ WARNING at line 1: (EMPTY_FILE) Empty script file. diff --git a/modules/gdscript/tests/scripts/parser/warnings/empty_file.notest.out b/modules/gdscript/tests/scripts/parser/warnings/empty_file.notest.out deleted file mode 100644 index 20eec212ba7..00000000000 --- a/modules/gdscript/tests/scripts/parser/warnings/empty_file.notest.out +++ /dev/null @@ -1,4 +0,0 @@ ->> WARNING ->> Line: 1 ->> EMPTY_FILE ->> Empty script file. diff --git a/modules/gdscript/tests/scripts/parser/warnings/empty_file_comment.norun.gd b/modules/gdscript/tests/scripts/parser/warnings/empty_file_comment.norun.gd new file mode 100644 index 00000000000..d6e4a710da1 --- /dev/null +++ b/modules/gdscript/tests/scripts/parser/warnings/empty_file_comment.norun.gd @@ -0,0 +1 @@ +# A comment. diff --git a/modules/gdscript/tests/scripts/parser/warnings/empty_file_comment.norun.out b/modules/gdscript/tests/scripts/parser/warnings/empty_file_comment.norun.out new file mode 100644 index 00000000000..58ef91730e8 --- /dev/null +++ b/modules/gdscript/tests/scripts/parser/warnings/empty_file_comment.norun.out @@ -0,0 +1,2 @@ +GDTEST_OK +~~ WARNING at line 1: (EMPTY_FILE) Empty script file. diff --git a/modules/gdscript/tests/scripts/parser/warnings/empty_file_comment.notest.gd b/modules/gdscript/tests/scripts/parser/warnings/empty_file_comment.notest.gd deleted file mode 100644 index 15cd95ff2b0..00000000000 --- a/modules/gdscript/tests/scripts/parser/warnings/empty_file_comment.notest.gd +++ /dev/null @@ -1 +0,0 @@ -#a comment diff --git a/modules/gdscript/tests/scripts/parser/warnings/empty_file_comment.notest.out b/modules/gdscript/tests/scripts/parser/warnings/empty_file_comment.notest.out deleted file mode 100644 index 20eec212ba7..00000000000 --- a/modules/gdscript/tests/scripts/parser/warnings/empty_file_comment.notest.out +++ /dev/null @@ -1,4 +0,0 @@ ->> WARNING ->> Line: 1 ->> EMPTY_FILE ->> Empty script file. diff --git a/modules/gdscript/tests/scripts/parser/warnings/empty_file_newline.notest.gd b/modules/gdscript/tests/scripts/parser/warnings/empty_file_newline.norun.gd similarity index 100% rename from modules/gdscript/tests/scripts/parser/warnings/empty_file_newline.notest.gd rename to modules/gdscript/tests/scripts/parser/warnings/empty_file_newline.norun.gd diff --git a/modules/gdscript/tests/scripts/parser/warnings/empty_file_newline.norun.out b/modules/gdscript/tests/scripts/parser/warnings/empty_file_newline.norun.out new file mode 100644 index 00000000000..58ef91730e8 --- /dev/null +++ b/modules/gdscript/tests/scripts/parser/warnings/empty_file_newline.norun.out @@ -0,0 +1,2 @@ +GDTEST_OK +~~ WARNING at line 1: (EMPTY_FILE) Empty script file. diff --git a/modules/gdscript/tests/scripts/parser/warnings/empty_file_newline.notest.out b/modules/gdscript/tests/scripts/parser/warnings/empty_file_newline.notest.out deleted file mode 100644 index 20eec212ba7..00000000000 --- a/modules/gdscript/tests/scripts/parser/warnings/empty_file_newline.notest.out +++ /dev/null @@ -1,4 +0,0 @@ ->> WARNING ->> Line: 1 ->> EMPTY_FILE ->> Empty script file. diff --git a/modules/gdscript/tests/scripts/parser/warnings/empty_file_newline_comment.norun.gd b/modules/gdscript/tests/scripts/parser/warnings/empty_file_newline_comment.norun.gd new file mode 100644 index 00000000000..23a69b9fd6c --- /dev/null +++ b/modules/gdscript/tests/scripts/parser/warnings/empty_file_newline_comment.norun.gd @@ -0,0 +1,4 @@ +# A comment, followed by a bunch of newlines. + + + diff --git a/modules/gdscript/tests/scripts/parser/warnings/empty_file_newline_comment.norun.out b/modules/gdscript/tests/scripts/parser/warnings/empty_file_newline_comment.norun.out new file mode 100644 index 00000000000..58ef91730e8 --- /dev/null +++ b/modules/gdscript/tests/scripts/parser/warnings/empty_file_newline_comment.norun.out @@ -0,0 +1,2 @@ +GDTEST_OK +~~ WARNING at line 1: (EMPTY_FILE) Empty script file. diff --git a/modules/gdscript/tests/scripts/parser/warnings/empty_file_newline_comment.notest.gd b/modules/gdscript/tests/scripts/parser/warnings/empty_file_newline_comment.notest.gd deleted file mode 100644 index ecdba44d214..00000000000 --- a/modules/gdscript/tests/scripts/parser/warnings/empty_file_newline_comment.notest.gd +++ /dev/null @@ -1,4 +0,0 @@ -#a comment, followed by a bunch of newlines - - - diff --git a/modules/gdscript/tests/scripts/parser/warnings/empty_file_newline_comment.notest.out b/modules/gdscript/tests/scripts/parser/warnings/empty_file_newline_comment.notest.out deleted file mode 100644 index 20eec212ba7..00000000000 --- a/modules/gdscript/tests/scripts/parser/warnings/empty_file_newline_comment.notest.out +++ /dev/null @@ -1,4 +0,0 @@ ->> WARNING ->> Line: 1 ->> EMPTY_FILE ->> Empty script file. diff --git a/modules/gdscript/tests/scripts/parser/warnings/enum_assign_int_without_casting.out b/modules/gdscript/tests/scripts/parser/warnings/enum_assign_int_without_casting.out index b8e243769fb..5b19af4d657 100644 --- a/modules/gdscript/tests/scripts/parser/warnings/enum_assign_int_without_casting.out +++ b/modules/gdscript/tests/scripts/parser/warnings/enum_assign_int_without_casting.out @@ -1,20 +1,8 @@ GDTEST_OK ->> WARNING ->> Line: 5 ->> INT_AS_ENUM_WITHOUT_CAST ->> Integer used when an enum value is expected. If this is intended cast the integer to the enum type. ->> WARNING ->> Line: 9 ->> INT_AS_ENUM_WITHOUT_CAST ->> Integer used when an enum value is expected. If this is intended cast the integer to the enum type. ->> WARNING ->> Line: 12 ->> INT_AS_ENUM_WITHOUT_CAST ->> Integer used when an enum value is expected. If this is intended cast the integer to the enum type. ->> WARNING ->> Line: 14 ->> INT_AS_ENUM_WITHOUT_CAST ->> Integer used when an enum value is expected. If this is intended cast the integer to the enum type. +~~ WARNING at line 5: (INT_AS_ENUM_WITHOUT_CAST) Integer used when an enum value is expected. If this is intended cast the integer to the enum type. +~~ WARNING at line 9: (INT_AS_ENUM_WITHOUT_CAST) Integer used when an enum value is expected. If this is intended cast the integer to the enum type. +~~ WARNING at line 12: (INT_AS_ENUM_WITHOUT_CAST) Integer used when an enum value is expected. If this is intended cast the integer to the enum type. +~~ WARNING at line 14: (INT_AS_ENUM_WITHOUT_CAST) Integer used when an enum value is expected. If this is intended cast the integer to the enum type. 0 1 0 diff --git a/modules/gdscript/tests/scripts/parser/warnings/incompatible_ternary.out b/modules/gdscript/tests/scripts/parser/warnings/incompatible_ternary.out index ff3e8272555..36e49b815f3 100644 --- a/modules/gdscript/tests/scripts/parser/warnings/incompatible_ternary.out +++ b/modules/gdscript/tests/scripts/parser/warnings/incompatible_ternary.out @@ -1,5 +1,2 @@ GDTEST_OK ->> WARNING ->> Line: 8 ->> INCOMPATIBLE_TERNARY ->> Values of the ternary operator are not mutually compatible. +~~ WARNING at line 8: (INCOMPATIBLE_TERNARY) Values of the ternary operator are not mutually compatible. diff --git a/modules/gdscript/tests/scripts/parser/warnings/integer_division.out b/modules/gdscript/tests/scripts/parser/warnings/integer_division.out index 40eb63ffcbd..a43caf5c28d 100644 --- a/modules/gdscript/tests/scripts/parser/warnings/integer_division.out +++ b/modules/gdscript/tests/scripts/parser/warnings/integer_division.out @@ -1,5 +1,2 @@ GDTEST_OK ->> WARNING ->> Line: 3 ->> INTEGER_DIVISION ->> Integer division, decimal part will be discarded. +~~ WARNING at line 3: (INTEGER_DIVISION) Integer division, decimal part will be discarded. diff --git a/modules/gdscript/tests/scripts/parser/warnings/match_default_not_at_end.out b/modules/gdscript/tests/scripts/parser/warnings/match_default_not_at_end.out index 8630fab4209..a0d134aa1b4 100644 --- a/modules/gdscript/tests/scripts/parser/warnings/match_default_not_at_end.out +++ b/modules/gdscript/tests/scripts/parser/warnings/match_default_not_at_end.out @@ -1,6 +1,3 @@ GDTEST_OK ->> WARNING ->> Line: 8 ->> UNREACHABLE_PATTERN ->> Unreachable pattern (pattern after wildcard or bind). +~~ WARNING at line 8: (UNREACHABLE_PATTERN) Unreachable pattern (pattern after wildcard or bind). default diff --git a/modules/gdscript/tests/scripts/parser/warnings/narrowing_conversion.out b/modules/gdscript/tests/scripts/parser/warnings/narrowing_conversion.out index 6fb592117be..065dc197fa4 100644 --- a/modules/gdscript/tests/scripts/parser/warnings/narrowing_conversion.out +++ b/modules/gdscript/tests/scripts/parser/warnings/narrowing_conversion.out @@ -1,5 +1,2 @@ GDTEST_OK ->> WARNING ->> Line: 5 ->> NARROWING_CONVERSION ->> Narrowing conversion (float is converted to int and loses precision). +~~ WARNING at line 5: (NARROWING_CONVERSION) Narrowing conversion (float is converted to int and loses precision). diff --git a/modules/gdscript/tests/scripts/parser/warnings/return_value_discarded.out b/modules/gdscript/tests/scripts/parser/warnings/return_value_discarded.out index 107051df6c0..6707e5eb3fd 100644 --- a/modules/gdscript/tests/scripts/parser/warnings/return_value_discarded.out +++ b/modules/gdscript/tests/scripts/parser/warnings/return_value_discarded.out @@ -1,9 +1,3 @@ GDTEST_OK ->> WARNING ->> Line: 6 ->> RETURN_VALUE_DISCARDED ->> The function "i_return_int()" returns a value that will be discarded if not used. ->> WARNING ->> Line: 7 ->> RETURN_VALUE_DISCARDED ->> The function "preload()" returns a value that will be discarded if not used. +~~ WARNING at line 6: (RETURN_VALUE_DISCARDED) The function "i_return_int()" returns a value that will be discarded if not used. +~~ WARNING at line 7: (RETURN_VALUE_DISCARDED) The function "preload()" returns a value that will be discarded if not used. diff --git a/modules/gdscript/tests/scripts/parser/warnings/shadowed_constant.out b/modules/gdscript/tests/scripts/parser/warnings/shadowed_constant.out index 04df229f664..3f673141f1b 100644 --- a/modules/gdscript/tests/scripts/parser/warnings/shadowed_constant.out +++ b/modules/gdscript/tests/scripts/parser/warnings/shadowed_constant.out @@ -1,9 +1,3 @@ GDTEST_OK ->> WARNING ->> Line: 8 ->> UNUSED_LOCAL_CONSTANT ->> The local constant "TEST" is declared but never used in the block. If this is intended, prefix it with an underscore: "_TEST". ->> WARNING ->> Line: 8 ->> SHADOWED_VARIABLE ->> The local constant "TEST" is shadowing an already-declared constant at line 2 in the current class. +~~ WARNING at line 8: (UNUSED_LOCAL_CONSTANT) The local constant "TEST" is declared but never used in the block. If this is intended, prefix it with an underscore: "_TEST". +~~ WARNING at line 8: (SHADOWED_VARIABLE) The local constant "TEST" is shadowing an already-declared constant at line 2 in the current class. diff --git a/modules/gdscript/tests/scripts/parser/warnings/shadowed_global_identifier.out b/modules/gdscript/tests/scripts/parser/warnings/shadowed_global_identifier.out index 75a02c5d3c7..7c047b39415 100644 --- a/modules/gdscript/tests/scripts/parser/warnings/shadowed_global_identifier.out +++ b/modules/gdscript/tests/scripts/parser/warnings/shadowed_global_identifier.out @@ -1,9 +1,3 @@ GDTEST_OK ->> WARNING ->> Line: 2 ->> UNUSED_VARIABLE ->> The local variable "abs" is declared but never used in the block. If this is intended, prefix it with an underscore: "_abs". ->> WARNING ->> Line: 2 ->> SHADOWED_GLOBAL_IDENTIFIER ->> The variable "abs" has the same name as a built-in function. +~~ WARNING at line 2: (UNUSED_VARIABLE) The local variable "abs" is declared but never used in the block. If this is intended, prefix it with an underscore: "_abs". +~~ WARNING at line 2: (SHADOWED_GLOBAL_IDENTIFIER) The variable "abs" has the same name as a built-in function. diff --git a/modules/gdscript/tests/scripts/parser/warnings/shadowed_variable_class.out b/modules/gdscript/tests/scripts/parser/warnings/shadowed_variable_class.out index 4a6964f503c..1ee7378d482 100644 --- a/modules/gdscript/tests/scripts/parser/warnings/shadowed_variable_class.out +++ b/modules/gdscript/tests/scripts/parser/warnings/shadowed_variable_class.out @@ -1,9 +1,3 @@ GDTEST_OK ->> WARNING ->> Line: 8 ->> UNUSED_VARIABLE ->> The local variable "foo" is declared but never used in the block. If this is intended, prefix it with an underscore: "_foo". ->> WARNING ->> Line: 8 ->> SHADOWED_VARIABLE ->> The local variable "foo" is shadowing an already-declared variable at line 1 in the current class. +~~ WARNING at line 8: (UNUSED_VARIABLE) The local variable "foo" is declared but never used in the block. If this is intended, prefix it with an underscore: "_foo". +~~ WARNING at line 8: (SHADOWED_VARIABLE) The local variable "foo" is shadowing an already-declared variable at line 1 in the current class. diff --git a/modules/gdscript/tests/scripts/parser/warnings/shadowed_variable_function.out b/modules/gdscript/tests/scripts/parser/warnings/shadowed_variable_function.out index 45fb7718295..d9326eda28b 100644 --- a/modules/gdscript/tests/scripts/parser/warnings/shadowed_variable_function.out +++ b/modules/gdscript/tests/scripts/parser/warnings/shadowed_variable_function.out @@ -1,9 +1,3 @@ GDTEST_OK ->> WARNING ->> Line: 2 ->> UNUSED_VARIABLE ->> The local variable "test" is declared but never used in the block. If this is intended, prefix it with an underscore: "_test". ->> WARNING ->> Line: 2 ->> SHADOWED_VARIABLE ->> The local variable "test" is shadowing an already-declared function at line 1 in the current class. +~~ WARNING at line 2: (UNUSED_VARIABLE) The local variable "test" is declared but never used in the block. If this is intended, prefix it with an underscore: "_test". +~~ WARNING at line 2: (SHADOWED_VARIABLE) The local variable "test" is shadowing an already-declared function at line 1 in the current class. diff --git a/modules/gdscript/tests/scripts/parser/warnings/standalone_expression.out b/modules/gdscript/tests/scripts/parser/warnings/standalone_expression.out index 72c659c952f..a2b0d37e6b5 100644 --- a/modules/gdscript/tests/scripts/parser/warnings/standalone_expression.out +++ b/modules/gdscript/tests/scripts/parser/warnings/standalone_expression.out @@ -1,17 +1,5 @@ GDTEST_OK ->> WARNING ->> Line: 3 ->> STANDALONE_EXPRESSION ->> Standalone expression (the line may have no effect). ->> WARNING ->> Line: 4 ->> STANDALONE_EXPRESSION ->> Standalone expression (the line may have no effect). ->> WARNING ->> Line: 6 ->> STANDALONE_EXPRESSION ->> Standalone expression (the line may have no effect). ->> WARNING ->> Line: 7 ->> STANDALONE_EXPRESSION ->> Standalone expression (the line may have no effect). +~~ WARNING at line 3: (STANDALONE_EXPRESSION) Standalone expression (the line may have no effect). +~~ WARNING at line 4: (STANDALONE_EXPRESSION) Standalone expression (the line may have no effect). +~~ WARNING at line 6: (STANDALONE_EXPRESSION) Standalone expression (the line may have no effect). +~~ WARNING at line 7: (STANDALONE_EXPRESSION) Standalone expression (the line may have no effect). diff --git a/modules/gdscript/tests/scripts/parser/warnings/standalone_ternary.out b/modules/gdscript/tests/scripts/parser/warnings/standalone_ternary.out index 477449e0e3a..1c57c8719ff 100644 --- a/modules/gdscript/tests/scripts/parser/warnings/standalone_ternary.out +++ b/modules/gdscript/tests/scripts/parser/warnings/standalone_ternary.out @@ -1,10 +1,4 @@ GDTEST_OK ->> WARNING ->> Line: 2 ->> STANDALONE_TERNARY ->> Standalone ternary operator: the return value is being discarded. ->> WARNING ->> Line: 3 ->> STANDALONE_TERNARY ->> Standalone ternary operator: the return value is being discarded. +~~ WARNING at line 2: (STANDALONE_TERNARY) Standalone ternary operator: the return value is being discarded. +~~ WARNING at line 3: (STANDALONE_TERNARY) Standalone ternary operator: the return value is being discarded. 1 diff --git a/modules/gdscript/tests/scripts/parser/warnings/static_called_on_instance.out b/modules/gdscript/tests/scripts/parser/warnings/static_called_on_instance.out index c00f3d093a1..b0fe54ea68b 100644 --- a/modules/gdscript/tests/scripts/parser/warnings/static_called_on_instance.out +++ b/modules/gdscript/tests/scripts/parser/warnings/static_called_on_instance.out @@ -1,15 +1,6 @@ GDTEST_OK ->> WARNING ->> Line: 13 ->> STATIC_CALLED_ON_INSTANCE ->> The function "num_uint64()" is a static function but was called from an instance. Instead, it should be directly called from the type: "String.num_uint64()". ->> WARNING ->> Line: 19 ->> STATIC_CALLED_ON_INSTANCE ->> The function "static_func()" is a static function but was called from an instance. Instead, it should be directly called from the type: "TestStaticCalledOnInstance.static_func()". ->> WARNING ->> Line: 23 ->> STATIC_CALLED_ON_INSTANCE ->> The function "static_func()" is a static function but was called from an instance. Instead, it should be directly called from the type: "Inner.static_func()". +~~ WARNING at line 13: (STATIC_CALLED_ON_INSTANCE) The function "num_uint64()" is a static function but was called from an instance. Instead, it should be directly called from the type: "String.num_uint64()". +~~ WARNING at line 19: (STATIC_CALLED_ON_INSTANCE) The function "static_func()" is a static function but was called from an instance. Instead, it should be directly called from the type: "TestStaticCalledOnInstance.static_func()". +~~ WARNING at line 23: (STATIC_CALLED_ON_INSTANCE) The function "static_func()" is a static function but was called from an instance. Instead, it should be directly called from the type: "Inner.static_func()". 8589934592 8589934592 diff --git a/modules/gdscript/tests/scripts/parser/warnings/unassigned_variable.out b/modules/gdscript/tests/scripts/parser/warnings/unassigned_variable.out index 36db304ef49..b9e53f771ab 100644 --- a/modules/gdscript/tests/scripts/parser/warnings/unassigned_variable.out +++ b/modules/gdscript/tests/scripts/parser/warnings/unassigned_variable.out @@ -1,16 +1,7 @@ GDTEST_OK ->> WARNING ->> Line: 3 ->> UNASSIGNED_VARIABLE ->> The variable "unassigned" was used before being assigned a value. ->> WARNING ->> Line: 7 ->> UNASSIGNED_VARIABLE ->> The variable "a" was used before being assigned a value. ->> WARNING ->> Line: 8 ->> UNASSIGNED_VARIABLE ->> The variable "a" was used before being assigned a value. +~~ WARNING at line 3: (UNASSIGNED_VARIABLE) The variable "unassigned" was used before being assigned a value. +~~ WARNING at line 7: (UNASSIGNED_VARIABLE) The variable "a" was used before being assigned a value. +~~ WARNING at line 8: (UNASSIGNED_VARIABLE) The variable "a" was used before being assigned a value. diff --git a/modules/gdscript/tests/scripts/parser/warnings/unassigned_variable_op_assign.out b/modules/gdscript/tests/scripts/parser/warnings/unassigned_variable_op_assign.out index 4fc91487f29..7be348935b1 100644 --- a/modules/gdscript/tests/scripts/parser/warnings/unassigned_variable_op_assign.out +++ b/modules/gdscript/tests/scripts/parser/warnings/unassigned_variable_op_assign.out @@ -1,5 +1,2 @@ GDTEST_OK ->> WARNING ->> Line: 4 ->> UNASSIGNED_VARIABLE_OP_ASSIGN ->> Using assignment with operation but the variable "__" was not previously assigned a value. +~~ WARNING at line 4: (UNASSIGNED_VARIABLE_OP_ASSIGN) Using assignment with operation but the variable "__" was not previously assigned a value. diff --git a/modules/gdscript/tests/scripts/parser/warnings/unreachable_code_after_return.out b/modules/gdscript/tests/scripts/parser/warnings/unreachable_code_after_return.out index f67dbdcd032..c37018aa4f1 100644 --- a/modules/gdscript/tests/scripts/parser/warnings/unreachable_code_after_return.out +++ b/modules/gdscript/tests/scripts/parser/warnings/unreachable_code_after_return.out @@ -1,5 +1,2 @@ GDTEST_OK ->> WARNING ->> Line: 7 ->> UNREACHABLE_CODE ->> Unreachable code (statement after return) in function "test()". +~~ WARNING at line 7: (UNREACHABLE_CODE) Unreachable code (statement after return) in function "test()". diff --git a/modules/gdscript/tests/scripts/parser/warnings/unused_argument.out b/modules/gdscript/tests/scripts/parser/warnings/unused_argument.out index 3a03406f92b..2d9dbc800be 100644 --- a/modules/gdscript/tests/scripts/parser/warnings/unused_argument.out +++ b/modules/gdscript/tests/scripts/parser/warnings/unused_argument.out @@ -1,5 +1,2 @@ GDTEST_OK ->> WARNING ->> Line: 2 ->> UNUSED_PARAMETER ->> The parameter "p_arg2" is never used in the function "function_with_unused_argument()". If this is intended, prefix it with an underscore: "_p_arg2". +~~ WARNING at line 2: (UNUSED_PARAMETER) The parameter "p_arg2" is never used in the function "function_with_unused_argument()". If this is intended, prefix it with an underscore: "_p_arg2". diff --git a/modules/gdscript/tests/scripts/parser/warnings/unused_constant.out b/modules/gdscript/tests/scripts/parser/warnings/unused_constant.out index 99ced484339..5f3d6f270ca 100644 --- a/modules/gdscript/tests/scripts/parser/warnings/unused_constant.out +++ b/modules/gdscript/tests/scripts/parser/warnings/unused_constant.out @@ -1,5 +1,2 @@ GDTEST_OK ->> WARNING ->> Line: 2 ->> UNUSED_LOCAL_CONSTANT ->> The local constant "UNUSED" is declared but never used in the block. If this is intended, prefix it with an underscore: "_UNUSED". +~~ WARNING at line 2: (UNUSED_LOCAL_CONSTANT) The local constant "UNUSED" is declared but never used in the block. If this is intended, prefix it with an underscore: "_UNUSED". diff --git a/modules/gdscript/tests/scripts/parser/warnings/unused_variable.out b/modules/gdscript/tests/scripts/parser/warnings/unused_variable.out index b9b39684732..9bc2659acd8 100644 --- a/modules/gdscript/tests/scripts/parser/warnings/unused_variable.out +++ b/modules/gdscript/tests/scripts/parser/warnings/unused_variable.out @@ -1,5 +1,2 @@ GDTEST_OK ->> WARNING ->> Line: 2 ->> UNUSED_VARIABLE ->> The local variable "unused" is declared but never used in the block. If this is intended, prefix it with an underscore: "_unused". +~~ WARNING at line 2: (UNUSED_VARIABLE) The local variable "unused" is declared but never used in the block. If this is intended, prefix it with an underscore: "_unused". diff --git a/modules/gdscript/tests/scripts/runtime/assign_to_read_only_property.gd b/modules/gdscript/tests/scripts/runtime/assign_to_read_only_property.gd deleted file mode 100644 index 19c41866223..00000000000 --- a/modules/gdscript/tests/scripts/runtime/assign_to_read_only_property.gd +++ /dev/null @@ -1,7 +0,0 @@ -func test(): - var state = PhysicsDirectBodyState3DExtension.new() - assign(state) - state.free() - -func assign(state): - state.center_of_mass.x -= 1.0 diff --git a/modules/gdscript/tests/scripts/runtime/assign_to_read_only_property.out b/modules/gdscript/tests/scripts/runtime/assign_to_read_only_property.out deleted file mode 100644 index c181c5dd023..00000000000 --- a/modules/gdscript/tests/scripts/runtime/assign_to_read_only_property.out +++ /dev/null @@ -1,6 +0,0 @@ -GDTEST_RUNTIME_ERROR ->> SCRIPT ERROR ->> on function: assign() ->> runtime/assign_to_read_only_property.gd ->> 7 ->> Cannot set value into property "center_of_mass" (on base "PhysicsDirectBodyState3DExtension") because it is read-only. diff --git a/modules/gdscript/tests/scripts/runtime/assign_to_read_only_property_with_variable_index.gd b/modules/gdscript/tests/scripts/runtime/assign_to_read_only_property_with_variable_index.gd deleted file mode 100644 index f15f580272e..00000000000 --- a/modules/gdscript/tests/scripts/runtime/assign_to_read_only_property_with_variable_index.gd +++ /dev/null @@ -1,8 +0,0 @@ -func test(): - var state = PhysicsDirectBodyState3DExtension.new() - var prop = &"center_of_mass" - assign(state, prop) - state.free() - -func assign(state, prop): - state[prop].x = 1.0 diff --git a/modules/gdscript/tests/scripts/runtime/assign_to_read_only_property_with_variable_index.out b/modules/gdscript/tests/scripts/runtime/assign_to_read_only_property_with_variable_index.out deleted file mode 100644 index 2cdc81aaccf..00000000000 --- a/modules/gdscript/tests/scripts/runtime/assign_to_read_only_property_with_variable_index.out +++ /dev/null @@ -1,6 +0,0 @@ -GDTEST_RUNTIME_ERROR ->> SCRIPT ERROR ->> on function: assign() ->> runtime/assign_to_read_only_property_with_variable_index.gd ->> 8 ->> Cannot set value into property "center_of_mass" (on base "PhysicsDirectBodyState3DExtension") because it is read-only. diff --git a/modules/gdscript/tests/scripts/runtime/errors/assign_freed_instance.gd b/modules/gdscript/tests/scripts/runtime/errors/assign_freed_instance.gd new file mode 100644 index 00000000000..08302930bc0 --- /dev/null +++ b/modules/gdscript/tests/scripts/runtime/errors/assign_freed_instance.gd @@ -0,0 +1,22 @@ +class A extends Node: + pass + +func subtest_native(): + var x = Node.new() + + x.free() + + var _ok = x + var _bad: Node = x + +func subtest_script(): + var x = A.new() + + x.free() + + var _ok = x + var _bad: A = x + +func test(): + subtest_native() + subtest_script() diff --git a/modules/gdscript/tests/scripts/runtime/errors/assign_freed_instance.out b/modules/gdscript/tests/scripts/runtime/errors/assign_freed_instance.out new file mode 100644 index 00000000000..19de682c6ca --- /dev/null +++ b/modules/gdscript/tests/scripts/runtime/errors/assign_freed_instance.out @@ -0,0 +1,3 @@ +GDTEST_RUNTIME_ERROR +>> SCRIPT ERROR at runtime/errors/assign_freed_instance.gd:10 on subtest_native(): Trying to assign invalid previously freed instance. +>> SCRIPT ERROR at runtime/errors/assign_freed_instance.gd:18 on subtest_script(): Trying to assign invalid previously freed instance. diff --git a/modules/gdscript/tests/scripts/runtime/errors/assign_to_read_only_property.gd b/modules/gdscript/tests/scripts/runtime/errors/assign_to_read_only_property.gd new file mode 100644 index 00000000000..2b7322ad8e1 --- /dev/null +++ b/modules/gdscript/tests/scripts/runtime/errors/assign_to_read_only_property.gd @@ -0,0 +1,11 @@ +func subtest_attribute(state): + state.center_of_mass.x -= 1.0 + +func subtest_variable_index(state, prop): + state[prop].x = 1.0 + +func test(): + var state = PhysicsDirectBodyState3DExtension.new() + subtest_attribute(state) + subtest_variable_index(state, &"center_of_mass") + state.free() diff --git a/modules/gdscript/tests/scripts/runtime/errors/assign_to_read_only_property.out b/modules/gdscript/tests/scripts/runtime/errors/assign_to_read_only_property.out new file mode 100644 index 00000000000..3492e799ff1 --- /dev/null +++ b/modules/gdscript/tests/scripts/runtime/errors/assign_to_read_only_property.out @@ -0,0 +1,6 @@ +GDTEST_RUNTIME_ERROR +~~ WARNING at line 9: (UNSAFE_CALL_ARGUMENT) The argument 1 of the function "subtest_attribute()" requires the subtype "Variant" but the supertype "Variant" was provided. +~~ WARNING at line 10: (UNSAFE_CALL_ARGUMENT) The argument 1 of the function "subtest_variable_index()" requires the subtype "Variant" but the supertype "Variant" was provided. +>> ERROR: Required virtual method PhysicsDirectBodyState3DExtension::_get_center_of_mass must be overridden before calling. +>> SCRIPT ERROR at runtime/errors/assign_to_read_only_property.gd:2 on subtest_attribute(): Cannot set value into property "center_of_mass" (on base "PhysicsDirectBodyState3DExtension") because it is read-only. +>> SCRIPT ERROR at runtime/errors/assign_to_read_only_property.gd:5 on subtest_variable_index(): Cannot set value into property "center_of_mass" (on base "PhysicsDirectBodyState3DExtension") because it is read-only. diff --git a/modules/gdscript/tests/scripts/runtime/errors/bad_conversion_for_default_parameter.out b/modules/gdscript/tests/scripts/runtime/errors/bad_conversion_for_default_parameter.out index 8543cf976e6..cbda76b39d8 100644 --- a/modules/gdscript/tests/scripts/runtime/errors/bad_conversion_for_default_parameter.out +++ b/modules/gdscript/tests/scripts/runtime/errors/bad_conversion_for_default_parameter.out @@ -1,8 +1,4 @@ GDTEST_RUNTIME_ERROR ->> SCRIPT ERROR ->> on function: weak() ->> runtime/errors/bad_conversion_for_default_parameter.gd ->> 2 ->> Trying to assign value of type 'String' to a variable of type 'float'. +>> SCRIPT ERROR at runtime/errors/bad_conversion_for_default_parameter.gd:2 on weak(): Trying to assign value of type 'String' to a variable of type 'float'. 0 not ok diff --git a/modules/gdscript/tests/scripts/runtime/errors/callable_call_after_free_object.out b/modules/gdscript/tests/scripts/runtime/errors/callable_call_after_free_object.out index fe48ade26be..2c45f5eb04a 100644 --- a/modules/gdscript/tests/scripts/runtime/errors/callable_call_after_free_object.out +++ b/modules/gdscript/tests/scripts/runtime/errors/callable_call_after_free_object.out @@ -1,6 +1,2 @@ GDTEST_RUNTIME_ERROR ->> SCRIPT ERROR ->> on function: test() ->> runtime/errors/callable_call_after_free_object.gd ->> 6 ->> Attempt to call function 'null::is_inside_tree (Callable)' on a null instance. +>> SCRIPT ERROR at runtime/errors/callable_call_after_free_object.gd:6 on test(): Attempt to call function 'null::is_inside_tree (Callable)' on a null instance. diff --git a/modules/gdscript/tests/scripts/runtime/errors/cast_freed_object.out b/modules/gdscript/tests/scripts/runtime/errors/cast_freed_object.out index 90d81dd9a1a..d6277056e87 100644 --- a/modules/gdscript/tests/scripts/runtime/errors/cast_freed_object.out +++ b/modules/gdscript/tests/scripts/runtime/errors/cast_freed_object.out @@ -1,6 +1,2 @@ GDTEST_RUNTIME_ERROR ->> SCRIPT ERROR ->> on function: test() ->> runtime/errors/cast_freed_object.gd ->> 4 ->> Trying to cast a freed object. +>> SCRIPT ERROR at runtime/errors/cast_freed_object.gd:4 on test(): Trying to cast a freed object. diff --git a/modules/gdscript/tests/scripts/runtime/errors/cast_int_to_array.out b/modules/gdscript/tests/scripts/runtime/errors/cast_int_to_array.out index 545d7a4906e..43b413c205e 100644 --- a/modules/gdscript/tests/scripts/runtime/errors/cast_int_to_array.out +++ b/modules/gdscript/tests/scripts/runtime/errors/cast_int_to_array.out @@ -1,6 +1,2 @@ GDTEST_RUNTIME_ERROR ->> SCRIPT ERROR ->> on function: test() ->> runtime/errors/cast_int_to_array.gd ->> 4 ->> Invalid cast: could not convert value to 'Array'. +>> SCRIPT ERROR at runtime/errors/cast_int_to_array.gd:4 on test(): Invalid cast: could not convert value to 'Array'. diff --git a/modules/gdscript/tests/scripts/runtime/errors/cast_int_to_object.out b/modules/gdscript/tests/scripts/runtime/errors/cast_int_to_object.out index 7c39b463963..42fef6ba949 100644 --- a/modules/gdscript/tests/scripts/runtime/errors/cast_int_to_object.out +++ b/modules/gdscript/tests/scripts/runtime/errors/cast_int_to_object.out @@ -1,6 +1,2 @@ GDTEST_RUNTIME_ERROR ->> SCRIPT ERROR ->> on function: test() ->> runtime/errors/cast_int_to_object.gd ->> 4 ->> Invalid cast: can't convert a non-object value to an object type. +>> SCRIPT ERROR at runtime/errors/cast_int_to_object.gd:4 on test(): Invalid cast: can't convert a non-object value to an object type. diff --git a/modules/gdscript/tests/scripts/runtime/errors/cast_object_to_int.out b/modules/gdscript/tests/scripts/runtime/errors/cast_object_to_int.out index f922199fb30..205727808e0 100644 --- a/modules/gdscript/tests/scripts/runtime/errors/cast_object_to_int.out +++ b/modules/gdscript/tests/scripts/runtime/errors/cast_object_to_int.out @@ -1,6 +1,2 @@ GDTEST_RUNTIME_ERROR ->> SCRIPT ERROR ->> on function: test() ->> runtime/errors/cast_object_to_int.gd ->> 4 ->> Invalid cast: could not convert value to 'int'. +>> SCRIPT ERROR at runtime/errors/cast_object_to_int.gd:4 on test(): Invalid cast: could not convert value to 'int'. diff --git a/modules/gdscript/tests/scripts/runtime/errors/constant_array_is_deep.out b/modules/gdscript/tests/scripts/runtime/errors/constant_array_is_deep.out index 350d5d1d458..ccd0da39ad6 100644 --- a/modules/gdscript/tests/scripts/runtime/errors/constant_array_is_deep.out +++ b/modules/gdscript/tests/scripts/runtime/errors/constant_array_is_deep.out @@ -1,6 +1,4 @@ GDTEST_RUNTIME_ERROR ->> SCRIPT ERROR ->> on function: test() ->> runtime/errors/constant_array_is_deep.gd ->> 6 ->> Invalid assignment on read-only value (on base: 'Dictionary'). +>> ERROR: Condition "_p->read_only" is true. Returning: false +>> Dictionary is in read-only state. +>> SCRIPT ERROR at runtime/errors/constant_array_is_deep.gd:6 on test(): Invalid assignment on read-only value (on base: 'Dictionary'). diff --git a/modules/gdscript/tests/scripts/runtime/errors/constant_dictionary_is_deep.out b/modules/gdscript/tests/scripts/runtime/errors/constant_dictionary_is_deep.out index 5f1f372b0a3..9f7965de38b 100644 --- a/modules/gdscript/tests/scripts/runtime/errors/constant_dictionary_is_deep.out +++ b/modules/gdscript/tests/scripts/runtime/errors/constant_dictionary_is_deep.out @@ -1,6 +1,2 @@ GDTEST_RUNTIME_ERROR ->> SCRIPT ERROR ->> on function: test() ->> runtime/errors/constant_dictionary_is_deep.gd ->> 6 ->> Invalid assignment on read-only value (on base: 'Array'). +>> SCRIPT ERROR at runtime/errors/constant_dictionary_is_deep.gd:6 on test(): Invalid assignment on read-only value (on base: 'Array'). diff --git a/modules/gdscript/tests/scripts/runtime/errors/for_loop_iterator_type_not_match_specified.out b/modules/gdscript/tests/scripts/runtime/errors/for_loop_iterator_type_not_match_specified.out index b7ef07afb2b..427358a7d3a 100644 --- a/modules/gdscript/tests/scripts/runtime/errors/for_loop_iterator_type_not_match_specified.out +++ b/modules/gdscript/tests/scripts/runtime/errors/for_loop_iterator_type_not_match_specified.out @@ -1,6 +1,2 @@ GDTEST_RUNTIME_ERROR ->> SCRIPT ERROR ->> on function: test() ->> runtime/errors/for_loop_iterator_type_not_match_specified.gd ->> 3 ->> Trying to assign value of type 'Resource' to a variable of type 'Node'. +>> SCRIPT ERROR at runtime/errors/for_loop_iterator_type_not_match_specified.gd:3 on test(): Trying to assign value of type 'Resource' to a variable of type 'Node'. diff --git a/modules/gdscript/tests/scripts/runtime/errors/gd_utility_function_wrong_arg.out b/modules/gdscript/tests/scripts/runtime/errors/gd_utility_function_wrong_arg.out index 6d2938dcf3e..ed58a05cce7 100644 --- a/modules/gdscript/tests/scripts/runtime/errors/gd_utility_function_wrong_arg.out +++ b/modules/gdscript/tests/scripts/runtime/errors/gd_utility_function_wrong_arg.out @@ -1,6 +1,2 @@ GDTEST_RUNTIME_ERROR ->> SCRIPT ERROR ->> on function: test() ->> runtime/errors/gd_utility_function_wrong_arg.gd ->> 3 ->> Error calling GDScript utility function "len()": Value of type 'Color' can't provide a length. +>> SCRIPT ERROR at runtime/errors/gd_utility_function_wrong_arg.gd:3 on test(): Error calling GDScript utility function "len()": Value of type 'Color' can't provide a length. diff --git a/modules/gdscript/tests/scripts/runtime/errors/invalid_property_assignment.out b/modules/gdscript/tests/scripts/runtime/errors/invalid_property_assignment.out index dfca5b1eca3..60fcb13207d 100644 --- a/modules/gdscript/tests/scripts/runtime/errors/invalid_property_assignment.out +++ b/modules/gdscript/tests/scripts/runtime/errors/invalid_property_assignment.out @@ -1,6 +1,2 @@ GDTEST_RUNTIME_ERROR ->> SCRIPT ERROR ->> on function: test() ->> runtime/errors/invalid_property_assignment.gd ->> 9 ->> Invalid assignment of property or key 'obj' with value of type 'RefCounted (MyObj)' on a base object of type 'RefCounted (MyObj)'. +>> SCRIPT ERROR at runtime/errors/invalid_property_assignment.gd:9 on test(): Invalid assignment of property or key 'obj' with value of type 'RefCounted (MyObj)' on a base object of type 'RefCounted (MyObj)'. diff --git a/modules/gdscript/tests/scripts/runtime/errors/non_static_method_call_on_native_class.out b/modules/gdscript/tests/scripts/runtime/errors/non_static_method_call_on_native_class.out index 3a90f98d999..fac0b4d8139 100644 --- a/modules/gdscript/tests/scripts/runtime/errors/non_static_method_call_on_native_class.out +++ b/modules/gdscript/tests/scripts/runtime/errors/non_static_method_call_on_native_class.out @@ -1,6 +1,3 @@ GDTEST_RUNTIME_ERROR ->> SCRIPT ERROR ->> on function: example() ->> runtime/errors/non_static_method_call_on_native_class.gd ->> 6 ->> Invalid call. Nonexistent function 'has_method' in base 'Node2D'. +~~ WARNING at line 6: (UNSAFE_METHOD_ACCESS) The method "has_method()" is not present on the inferred type "Variant" (but may be present on a subtype). +>> SCRIPT ERROR at runtime/errors/non_static_method_call_on_native_class.gd:6 on example(): Invalid call. Nonexistent function 'has_method' in base 'Node2D'. diff --git a/modules/gdscript/tests/scripts/runtime/errors/outer_class_constants.gd b/modules/gdscript/tests/scripts/runtime/errors/outer_class_constants.gd new file mode 100644 index 00000000000..015e1a3c324 --- /dev/null +++ b/modules/gdscript/tests/scripts/runtime/errors/outer_class_constants.gd @@ -0,0 +1,28 @@ +class Outer: + const OUTER_CONST := 0 + class Inner: + pass + +func subtest_type_hard(): + var type := Outer.Inner + print(type.OUTER_CONST) + +func subtest_type_weak(): + var type := Outer.Inner + var type_v: Variant = type + print(type_v.OUTER_CONST) + +func subtest_instance_hard(): + var instance := Outer.Inner.new() + print(instance.OUTER_CONST) + +func subtest_instance_weak(): + var instance := Outer.Inner.new() + var instance_v: Variant = instance + print(instance_v.OUTER_CONST) + +func test(): + subtest_type_hard() + subtest_type_weak() + subtest_instance_hard() + subtest_instance_weak() diff --git a/modules/gdscript/tests/scripts/runtime/errors/outer_class_constants.out b/modules/gdscript/tests/scripts/runtime/errors/outer_class_constants.out new file mode 100644 index 00000000000..7be1c310764 --- /dev/null +++ b/modules/gdscript/tests/scripts/runtime/errors/outer_class_constants.out @@ -0,0 +1,7 @@ +GDTEST_RUNTIME_ERROR +~~ WARNING at line 8: (UNSAFE_PROPERTY_ACCESS) The property "OUTER_CONST" is not present on the inferred type "Inner" (but may be present on a subtype). +~~ WARNING at line 17: (UNSAFE_PROPERTY_ACCESS) The property "OUTER_CONST" is not present on the inferred type "Inner" (but may be present on a subtype). +>> SCRIPT ERROR at runtime/errors/outer_class_constants.gd:8 on subtest_type_hard(): Invalid access to property or key 'OUTER_CONST' on a base object of type 'GDScript'. +>> SCRIPT ERROR at runtime/errors/outer_class_constants.gd:13 on subtest_type_weak(): Invalid access to property or key 'OUTER_CONST' on a base object of type 'GDScript'. +>> SCRIPT ERROR at runtime/errors/outer_class_constants.gd:17 on subtest_instance_hard(): Invalid access to property or key 'OUTER_CONST' on a base object of type 'RefCounted (Inner)'. +>> SCRIPT ERROR at runtime/errors/outer_class_constants.gd:22 on subtest_instance_weak(): Invalid access to property or key 'OUTER_CONST' on a base object of type 'RefCounted (Inner)'. diff --git a/modules/gdscript/tests/scripts/runtime/errors/read_only_dictionary.out b/modules/gdscript/tests/scripts/runtime/errors/read_only_dictionary.out index f7d531e1192..2c0247f3693 100644 --- a/modules/gdscript/tests/scripts/runtime/errors/read_only_dictionary.out +++ b/modules/gdscript/tests/scripts/runtime/errors/read_only_dictionary.out @@ -1,6 +1,4 @@ GDTEST_RUNTIME_ERROR ->> SCRIPT ERROR ->> on function: test() ->> runtime/errors/read_only_dictionary.gd ->> 4 ->> Invalid assignment on read-only value (on base: 'Dictionary'). +>> ERROR: Condition "_p->read_only" is true. Returning: false +>> Dictionary is in read-only state. +>> SCRIPT ERROR at runtime/errors/read_only_dictionary.gd:4 on test(): Invalid assignment on read-only value (on base: 'Dictionary'). diff --git a/modules/gdscript/tests/scripts/runtime/errors/typed_array_assign_basic_to_typed.gd b/modules/gdscript/tests/scripts/runtime/errors/typed_array_assign_basic_to_typed.gd index e9dbc1b6407..eedbef6fb80 100644 --- a/modules/gdscript/tests/scripts/runtime/errors/typed_array_assign_basic_to_typed.gd +++ b/modules/gdscript/tests/scripts/runtime/errors/typed_array_assign_basic_to_typed.gd @@ -1,4 +1,4 @@ func test(): var basic := [1] - var typed: Array[int] = basic + var _typed: Array[int] = basic print('not ok') diff --git a/modules/gdscript/tests/scripts/runtime/errors/typed_array_assign_basic_to_typed.out b/modules/gdscript/tests/scripts/runtime/errors/typed_array_assign_basic_to_typed.out index bca700b4ecb..7f18f540002 100644 --- a/modules/gdscript/tests/scripts/runtime/errors/typed_array_assign_basic_to_typed.out +++ b/modules/gdscript/tests/scripts/runtime/errors/typed_array_assign_basic_to_typed.out @@ -1,6 +1,2 @@ GDTEST_RUNTIME_ERROR ->> SCRIPT ERROR ->> on function: test() ->> runtime/errors/typed_array_assign_basic_to_typed.gd ->> 3 ->> Trying to assign an array of type "Array" to a variable of type "Array[int]". +>> SCRIPT ERROR at runtime/errors/typed_array_assign_basic_to_typed.gd:3 on test(): Trying to assign an array of type "Array" to a variable of type "Array[int]". diff --git a/modules/gdscript/tests/scripts/runtime/errors/typed_array_assign_differently_typed.gd b/modules/gdscript/tests/scripts/runtime/errors/typed_array_assign_differently_typed.gd index 920352a6ea2..c33e91bc810 100644 --- a/modules/gdscript/tests/scripts/runtime/errors/typed_array_assign_differently_typed.gd +++ b/modules/gdscript/tests/scripts/runtime/errors/typed_array_assign_differently_typed.gd @@ -1,4 +1,4 @@ func test(): var differently: Variant = [1.0] as Array[float] - var typed: Array[int] = differently + var _typed: Array[int] = differently print('not ok') diff --git a/modules/gdscript/tests/scripts/runtime/errors/typed_array_assign_differently_typed.out b/modules/gdscript/tests/scripts/runtime/errors/typed_array_assign_differently_typed.out index 402ab38fb34..2ef0f716200 100644 --- a/modules/gdscript/tests/scripts/runtime/errors/typed_array_assign_differently_typed.out +++ b/modules/gdscript/tests/scripts/runtime/errors/typed_array_assign_differently_typed.out @@ -1,6 +1,2 @@ GDTEST_RUNTIME_ERROR ->> SCRIPT ERROR ->> on function: test() ->> runtime/errors/typed_array_assign_differently_typed.gd ->> 3 ->> Trying to assign an array of type "Array[float]" to a variable of type "Array[int]". +>> SCRIPT ERROR at runtime/errors/typed_array_assign_differently_typed.gd:3 on test(): Trying to assign an array of type "Array[float]" to a variable of type "Array[int]". diff --git a/modules/gdscript/tests/scripts/runtime/errors/typed_array_assign_wrong_to_typed.gd b/modules/gdscript/tests/scripts/runtime/errors/typed_array_assign_wrong_to_typed.gd index 83ec6573dfe..034fdd58dca 100644 --- a/modules/gdscript/tests/scripts/runtime/errors/typed_array_assign_wrong_to_typed.gd +++ b/modules/gdscript/tests/scripts/runtime/errors/typed_array_assign_wrong_to_typed.gd @@ -3,5 +3,5 @@ class Bar extends Foo: pass class Baz extends Foo: pass func test(): - var typed: Array[Bar] = [Baz.new() as Foo] + var _typed: Array[Bar] = [Baz.new() as Foo] print('not ok') diff --git a/modules/gdscript/tests/scripts/runtime/errors/typed_array_assign_wrong_to_typed.out b/modules/gdscript/tests/scripts/runtime/errors/typed_array_assign_wrong_to_typed.out index 9b389571019..b142798f4c8 100644 --- a/modules/gdscript/tests/scripts/runtime/errors/typed_array_assign_wrong_to_typed.out +++ b/modules/gdscript/tests/scripts/runtime/errors/typed_array_assign_wrong_to_typed.out @@ -1,5 +1,6 @@ GDTEST_RUNTIME_ERROR ->> ERROR ->> Method/function failed. ->> Unable to convert array index 0 from "Object" to "Object". +>> ERROR: Condition "!other_script->inherits_script(script)" is true. Returning: false +>> Attempted to assign an object into a TypedArray, that does not inherit from 'GDScript'. +>> ERROR: Method/function failed. +>> Unable to convert array index 0 from "Object" to "Object". not ok diff --git a/modules/gdscript/tests/scripts/runtime/errors/typed_array_pass_basic_to_typed.out b/modules/gdscript/tests/scripts/runtime/errors/typed_array_pass_basic_to_typed.out index 810fe64823c..fd052368a22 100644 --- a/modules/gdscript/tests/scripts/runtime/errors/typed_array_pass_basic_to_typed.out +++ b/modules/gdscript/tests/scripts/runtime/errors/typed_array_pass_basic_to_typed.out @@ -1,6 +1,2 @@ GDTEST_RUNTIME_ERROR ->> SCRIPT ERROR ->> on function: test() ->> runtime/errors/typed_array_pass_basic_to_typed.gd ->> 6 ->> Invalid type in function 'expect_typed' in base 'RefCounted (typed_array_pass_basic_to_typed.gd)'. The array of argument 1 (Array) does not have the same element type as the expected typed array argument. +>> SCRIPT ERROR at runtime/errors/typed_array_pass_basic_to_typed.gd:6 on test(): Invalid type in function 'expect_typed' in base 'RefCounted (typed_array_pass_basic_to_typed.gd)'. The array of argument 1 (Array) does not have the same element type as the expected typed array argument. diff --git a/modules/gdscript/tests/scripts/runtime/errors/typed_array_pass_differently_to_typed.out b/modules/gdscript/tests/scripts/runtime/errors/typed_array_pass_differently_to_typed.out index f1b3612a4a9..588b9fe2d6a 100644 --- a/modules/gdscript/tests/scripts/runtime/errors/typed_array_pass_differently_to_typed.out +++ b/modules/gdscript/tests/scripts/runtime/errors/typed_array_pass_differently_to_typed.out @@ -1,6 +1,3 @@ GDTEST_RUNTIME_ERROR ->> SCRIPT ERROR ->> on function: test() ->> runtime/errors/typed_array_pass_differently_to_typed.gd ->> 6 ->> Invalid type in function 'expect_typed' in base 'RefCounted (typed_array_pass_differently_to_typed.gd)'. The array of argument 1 (Array[float]) does not have the same element type as the expected typed array argument. +~~ WARNING at line 6: (UNSAFE_CALL_ARGUMENT) The argument 1 of the function "expect_typed()" requires the subtype "Array[int]" but the supertype "Variant" was provided. +>> SCRIPT ERROR at runtime/errors/typed_array_pass_differently_to_typed.gd:6 on test(): Invalid type in function 'expect_typed' in base 'RefCounted (typed_array_pass_differently_to_typed.gd)'. The array of argument 1 (Array[float]) does not have the same element type as the expected typed array argument. diff --git a/modules/gdscript/tests/scripts/runtime/errors/typed_dictionary_assign_basic_to_typed.gd b/modules/gdscript/tests/scripts/runtime/errors/typed_dictionary_assign_basic_to_typed.gd index 75004742a26..27cca0039b0 100644 --- a/modules/gdscript/tests/scripts/runtime/errors/typed_dictionary_assign_basic_to_typed.gd +++ b/modules/gdscript/tests/scripts/runtime/errors/typed_dictionary_assign_basic_to_typed.gd @@ -1,4 +1,4 @@ func test(): var basic := { 1: 1 } - var typed: Dictionary[int, int] = basic + var _typed: Dictionary[int, int] = basic print('not ok') diff --git a/modules/gdscript/tests/scripts/runtime/errors/typed_dictionary_assign_basic_to_typed.out b/modules/gdscript/tests/scripts/runtime/errors/typed_dictionary_assign_basic_to_typed.out index cadb17f5702..85775be31ae 100644 --- a/modules/gdscript/tests/scripts/runtime/errors/typed_dictionary_assign_basic_to_typed.out +++ b/modules/gdscript/tests/scripts/runtime/errors/typed_dictionary_assign_basic_to_typed.out @@ -1,6 +1,2 @@ GDTEST_RUNTIME_ERROR ->> SCRIPT ERROR ->> on function: test() ->> runtime/errors/typed_dictionary_assign_basic_to_typed.gd ->> 3 ->> Trying to assign a dictionary of type "Dictionary" to a variable of type "Dictionary[int, int]". +>> SCRIPT ERROR at runtime/errors/typed_dictionary_assign_basic_to_typed.gd:3 on test(): Trying to assign a dictionary of type "Dictionary" to a variable of type "Dictionary[int, int]". diff --git a/modules/gdscript/tests/scripts/runtime/errors/typed_dictionary_assign_differently_typed.gd b/modules/gdscript/tests/scripts/runtime/errors/typed_dictionary_assign_differently_typed.gd index e5ab4a1a85c..04679696c03 100644 --- a/modules/gdscript/tests/scripts/runtime/errors/typed_dictionary_assign_differently_typed.gd +++ b/modules/gdscript/tests/scripts/runtime/errors/typed_dictionary_assign_differently_typed.gd @@ -1,4 +1,4 @@ func test(): var differently: Variant = { 1.0: 0.0 } as Dictionary[float, float] - var typed: Dictionary[int, int] = differently + var _typed: Dictionary[int, int] = differently print('not ok') diff --git a/modules/gdscript/tests/scripts/runtime/errors/typed_dictionary_assign_differently_typed.out b/modules/gdscript/tests/scripts/runtime/errors/typed_dictionary_assign_differently_typed.out index fe1e5d12854..6215984b2c7 100644 --- a/modules/gdscript/tests/scripts/runtime/errors/typed_dictionary_assign_differently_typed.out +++ b/modules/gdscript/tests/scripts/runtime/errors/typed_dictionary_assign_differently_typed.out @@ -1,6 +1,2 @@ GDTEST_RUNTIME_ERROR ->> SCRIPT ERROR ->> on function: test() ->> runtime/errors/typed_dictionary_assign_differently_typed.gd ->> 3 ->> Trying to assign a dictionary of type "Dictionary[float, float]" to a variable of type "Dictionary[int, int]". +>> SCRIPT ERROR at runtime/errors/typed_dictionary_assign_differently_typed.gd:3 on test(): Trying to assign a dictionary of type "Dictionary[float, float]" to a variable of type "Dictionary[int, int]". diff --git a/modules/gdscript/tests/scripts/runtime/errors/typed_dictionary_assign_differently_typed_key.out b/modules/gdscript/tests/scripts/runtime/errors/typed_dictionary_assign_differently_typed_key.out index 5f6dd7f641e..58143a3693d 100644 --- a/modules/gdscript/tests/scripts/runtime/errors/typed_dictionary_assign_differently_typed_key.out +++ b/modules/gdscript/tests/scripts/runtime/errors/typed_dictionary_assign_differently_typed_key.out @@ -1,6 +1,5 @@ GDTEST_RUNTIME_ERROR ->> SCRIPT ERROR ->> on function: test() ->> runtime/errors/typed_dictionary_assign_differently_typed_key.gd ->> 6 ->> Invalid assignment of property or key 'key' with value of type 'int' on a base object of type 'Dictionary[int, int]'. +>> ERROR: Method/function failed. Returning: false +>> Attempted to set a variable of type 'String' into a TypedDictionary.Key of type 'int'. +>> ERROR: Condition "!_p->typed_key.validate(key, "set")" is true. Returning: false +>> SCRIPT ERROR at runtime/errors/typed_dictionary_assign_differently_typed_key.gd:6 on test(): Invalid assignment of property or key 'key' with value of type 'int' on a base object of type 'Dictionary[int, int]'. diff --git a/modules/gdscript/tests/scripts/runtime/errors/typed_dictionary_assign_differently_typed_value.out b/modules/gdscript/tests/scripts/runtime/errors/typed_dictionary_assign_differently_typed_value.out index f766d142611..465ae7e15fa 100644 --- a/modules/gdscript/tests/scripts/runtime/errors/typed_dictionary_assign_differently_typed_value.out +++ b/modules/gdscript/tests/scripts/runtime/errors/typed_dictionary_assign_differently_typed_value.out @@ -1,6 +1,5 @@ GDTEST_RUNTIME_ERROR ->> SCRIPT ERROR ->> on function: test() ->> runtime/errors/typed_dictionary_assign_differently_typed_value.gd ->> 6 ->> Invalid assignment of property or key '0' with value of type 'String' on a base object of type 'Dictionary[int, int]'. +>> ERROR: Method/function failed. Returning: false +>> Attempted to set a variable of type 'String' into a TypedDictionary.Value of type 'int'. +>> ERROR: Condition "!_p->typed_value.validate(value, "set")" is true. Returning: false +>> SCRIPT ERROR at runtime/errors/typed_dictionary_assign_differently_typed_value.gd:6 on test(): Invalid assignment of property or key '0' with value of type 'String' on a base object of type 'Dictionary[int, int]'. diff --git a/modules/gdscript/tests/scripts/runtime/errors/typed_dictionary_assign_wrong_to_typed.gd b/modules/gdscript/tests/scripts/runtime/errors/typed_dictionary_assign_wrong_to_typed.gd index 6cc0e572556..491d2e546a2 100644 --- a/modules/gdscript/tests/scripts/runtime/errors/typed_dictionary_assign_wrong_to_typed.gd +++ b/modules/gdscript/tests/scripts/runtime/errors/typed_dictionary_assign_wrong_to_typed.gd @@ -3,5 +3,5 @@ class Bar extends Foo: pass class Baz extends Foo: pass func test(): - var typed: Dictionary[Bar, Bar] = { Baz.new() as Foo: Baz.new() as Foo } + var _typed: Dictionary[Bar, Bar] = { Baz.new() as Foo: Baz.new() as Foo } print('not ok') diff --git a/modules/gdscript/tests/scripts/runtime/errors/typed_dictionary_assign_wrong_to_typed.out b/modules/gdscript/tests/scripts/runtime/errors/typed_dictionary_assign_wrong_to_typed.out index 18a4c360e20..495c5b7a341 100644 --- a/modules/gdscript/tests/scripts/runtime/errors/typed_dictionary_assign_wrong_to_typed.out +++ b/modules/gdscript/tests/scripts/runtime/errors/typed_dictionary_assign_wrong_to_typed.out @@ -1,5 +1,6 @@ GDTEST_RUNTIME_ERROR ->> ERROR ->> Method/function failed. ->> Unable to convert key from "Object" to "Object". +>> ERROR: Condition "!other_script->inherits_script(script)" is true. Returning: false +>> Attempted to assign an object into a TypedDictionary.Key, that does not inherit from 'GDScript'. +>> ERROR: Method/function failed. +>> Unable to convert key from "Object" to "Object". not ok diff --git a/modules/gdscript/tests/scripts/runtime/errors/typed_dictionary_pass_basic_to_typed.out b/modules/gdscript/tests/scripts/runtime/errors/typed_dictionary_pass_basic_to_typed.out index fb454617014..9d5ef04abd1 100644 --- a/modules/gdscript/tests/scripts/runtime/errors/typed_dictionary_pass_basic_to_typed.out +++ b/modules/gdscript/tests/scripts/runtime/errors/typed_dictionary_pass_basic_to_typed.out @@ -1,6 +1,2 @@ GDTEST_RUNTIME_ERROR ->> SCRIPT ERROR ->> on function: test() ->> runtime/errors/typed_dictionary_pass_basic_to_typed.gd ->> 6 ->> Invalid type in function 'expect_typed' in base 'RefCounted (typed_dictionary_pass_basic_to_typed.gd)'. The dictionary of argument 1 (Dictionary) does not have the same element type as the expected typed dictionary argument. +>> SCRIPT ERROR at runtime/errors/typed_dictionary_pass_basic_to_typed.gd:6 on test(): Invalid type in function 'expect_typed' in base 'RefCounted (typed_dictionary_pass_basic_to_typed.gd)'. The dictionary of argument 1 (Dictionary) does not have the same element type as the expected typed dictionary argument. diff --git a/modules/gdscript/tests/scripts/runtime/errors/typed_dictionary_pass_differently_to_typed.out b/modules/gdscript/tests/scripts/runtime/errors/typed_dictionary_pass_differently_to_typed.out index 4036a1bf018..90d378d4c69 100644 --- a/modules/gdscript/tests/scripts/runtime/errors/typed_dictionary_pass_differently_to_typed.out +++ b/modules/gdscript/tests/scripts/runtime/errors/typed_dictionary_pass_differently_to_typed.out @@ -1,6 +1,3 @@ GDTEST_RUNTIME_ERROR ->> SCRIPT ERROR ->> on function: test() ->> runtime/errors/typed_dictionary_pass_differently_to_typed.gd ->> 6 ->> Invalid type in function 'expect_typed' in base 'RefCounted (typed_dictionary_pass_differently_to_typed.gd)'. The dictionary of argument 1 (Dictionary[float, float]) does not have the same element type as the expected typed dictionary argument. +~~ WARNING at line 6: (UNSAFE_CALL_ARGUMENT) The argument 1 of the function "expect_typed()" requires the subtype "Dictionary[int, int]" but the supertype "Variant" was provided. +>> SCRIPT ERROR at runtime/errors/typed_dictionary_pass_differently_to_typed.gd:6 on test(): Invalid type in function 'expect_typed' in base 'RefCounted (typed_dictionary_pass_differently_to_typed.gd)'. The dictionary of argument 1 (Dictionary[float, float]) does not have the same element type as the expected typed dictionary argument. diff --git a/modules/gdscript/tests/scripts/runtime/errors/use_return_value_of_free_call.out b/modules/gdscript/tests/scripts/runtime/errors/use_return_value_of_free_call.out index 5edaf194427..45468f600c5 100644 --- a/modules/gdscript/tests/scripts/runtime/errors/use_return_value_of_free_call.out +++ b/modules/gdscript/tests/scripts/runtime/errors/use_return_value_of_free_call.out @@ -1,6 +1,3 @@ GDTEST_RUNTIME_ERROR ->> SCRIPT ERROR ->> on function: test() ->> runtime/errors/use_return_value_of_free_call.gd ->> 4 ->> Trying to get a return value of a method that returns "void" +~~ WARNING at line 4: (UNSAFE_METHOD_ACCESS) The method "free()" is not present on the inferred type "Variant" (but may be present on a subtype). +>> SCRIPT ERROR at runtime/errors/use_return_value_of_free_call.gd:4 on test(): Trying to get a return value of a method that returns "void" diff --git a/modules/gdscript/tests/scripts/runtime/errors/use_return_value_of_void_builtin_method_call.out b/modules/gdscript/tests/scripts/runtime/errors/use_return_value_of_void_builtin_method_call.out index 128356ff8ae..dc1dd61d44e 100644 --- a/modules/gdscript/tests/scripts/runtime/errors/use_return_value_of_void_builtin_method_call.out +++ b/modules/gdscript/tests/scripts/runtime/errors/use_return_value_of_void_builtin_method_call.out @@ -1,6 +1,3 @@ GDTEST_RUNTIME_ERROR ->> SCRIPT ERROR ->> on function: test() ->> runtime/errors/use_return_value_of_void_builtin_method_call.gd ->> 4 ->> Trying to get a return value of a method that returns "void" +~~ WARNING at line 4: (UNSAFE_METHOD_ACCESS) The method "reverse()" is not present on the inferred type "Variant" (but may be present on a subtype). +>> SCRIPT ERROR at runtime/errors/use_return_value_of_void_builtin_method_call.gd:4 on test(): Trying to get a return value of a method that returns "void" diff --git a/modules/gdscript/tests/scripts/runtime/errors/use_return_value_of_void_native_method_call.out b/modules/gdscript/tests/scripts/runtime/errors/use_return_value_of_void_native_method_call.out index e02c206778b..93d9d1b82b0 100644 --- a/modules/gdscript/tests/scripts/runtime/errors/use_return_value_of_void_native_method_call.out +++ b/modules/gdscript/tests/scripts/runtime/errors/use_return_value_of_void_native_method_call.out @@ -1,6 +1,3 @@ GDTEST_RUNTIME_ERROR ->> SCRIPT ERROR ->> on function: test() ->> runtime/errors/use_return_value_of_void_native_method_call.gd ->> 4 ->> Trying to get a return value of a method that returns "void" +~~ WARNING at line 4: (UNSAFE_METHOD_ACCESS) The method "notify_property_list_changed()" is not present on the inferred type "Variant" (but may be present on a subtype). +>> SCRIPT ERROR at runtime/errors/use_return_value_of_void_native_method_call.gd:4 on test(): Trying to get a return value of a method that returns "void" diff --git a/modules/gdscript/tests/scripts/runtime/errors/utility_function_wrong_arg.out b/modules/gdscript/tests/scripts/runtime/errors/utility_function_wrong_arg.out index b311bfa38a8..5778d1bad45 100644 --- a/modules/gdscript/tests/scripts/runtime/errors/utility_function_wrong_arg.out +++ b/modules/gdscript/tests/scripts/runtime/errors/utility_function_wrong_arg.out @@ -1,6 +1,2 @@ GDTEST_RUNTIME_ERROR ->> SCRIPT ERROR ->> on function: test() ->> runtime/errors/utility_function_wrong_arg.gd ->> 3 ->> Error calling utility function "floor()": Argument "x" must be "int", "float", "Vector2", "Vector2i", "Vector3", "Vector3i", "Vector4", or "Vector4i". +>> SCRIPT ERROR at runtime/errors/utility_function_wrong_arg.gd:3 on test(): Error calling utility function "floor()": Argument "x" must be "int", "float", "Vector2", "Vector2i", "Vector3", "Vector3i", "Vector4", or "Vector4i". diff --git a/modules/gdscript/tests/scripts/runtime/features/await_without_coroutine.out b/modules/gdscript/tests/scripts/runtime/features/await_without_coroutine.out index c2ac488e9ba..e8c3739190c 100644 --- a/modules/gdscript/tests/scripts/runtime/features/await_without_coroutine.out +++ b/modules/gdscript/tests/scripts/runtime/features/await_without_coroutine.out @@ -1,6 +1,3 @@ GDTEST_OK ->> WARNING ->> Line: 4 ->> REDUNDANT_AWAIT ->> "await" keyword not needed in this case, because the expression isn't a coroutine nor a signal. +~~ WARNING at line 4: (REDUNDANT_AWAIT) "await" keyword not needed in this case, because the expression isn't a coroutine nor a signal. awaited diff --git a/modules/gdscript/tests/scripts/runtime/features/parameter_shadowing.out b/modules/gdscript/tests/scripts/runtime/features/parameter_shadowing.out index 1650acadb56..f7a482dab2c 100644 --- a/modules/gdscript/tests/scripts/runtime/features/parameter_shadowing.out +++ b/modules/gdscript/tests/scripts/runtime/features/parameter_shadowing.out @@ -1,12 +1,6 @@ GDTEST_OK ->> WARNING ->> Line: 5 ->> SHADOWED_VARIABLE ->> The local function parameter "a" is shadowing an already-declared variable at line 3 in the current class. ->> WARNING ->> Line: 15 ->> SHADOWED_VARIABLE ->> The local function parameter "v" is shadowing an already-declared variable at line 13 in the current class. +~~ WARNING at line 5: (SHADOWED_VARIABLE) The local function parameter "a" is shadowing an already-declared variable at line 3 in the current class. +~~ WARNING at line 15: (SHADOWED_VARIABLE) The local function parameter "v" is shadowing an already-declared variable at line 13 in the current class. a 1 b diff --git a/modules/gdscript/tests/scripts/runtime/features/typed_assignment.out b/modules/gdscript/tests/scripts/runtime/features/typed_assignment.out index 4a268dd8e07..98faf410f2c 100644 --- a/modules/gdscript/tests/scripts/runtime/features/typed_assignment.out +++ b/modules/gdscript/tests/scripts/runtime/features/typed_assignment.out @@ -1,12 +1,6 @@ GDTEST_OK ->> WARNING ->> Line: 6 ->> NARROWING_CONVERSION ->> Narrowing conversion (float is converted to int and loses precision). ->> WARNING ->> Line: 8 ->> NARROWING_CONVERSION ->> Narrowing conversion (float is converted to int and loses precision). +~~ WARNING at line 6: (NARROWING_CONVERSION) Narrowing conversion (float is converted to int and loses precision). +~~ WARNING at line 8: (NARROWING_CONVERSION) Narrowing conversion (float is converted to int and loses precision). 2 2 2