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 2fa0493544..bd6eddf2fc 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 025fcbd32a..aded628e27 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 34fff8d1de..3a877f36f0 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 8709b89b54..afb4b332ab 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 36224c6b6f..29200fd76c 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 be67182efb..0000000000 --- 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 260f062555..0000000000 --- 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 b4f0e79237..e681391ffd 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 5275183da2..bbebbe6239 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 5275183da2..bbebbe6239 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 5275183da2..876cad671e 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 b236d70ec8..1d3858f251 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 b236d70ec8..1d3858f251 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 cc4b1d86bf..97c39e5977 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 8f8744ad7e..2bb6b5bfa6 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 7dee854d1a..ec4f6568fe 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 1edbf47ec0..70a56196f8 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 7340058dd4..adfe41bc14 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 e3e82c2b7e..203fa04e49 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 7de40418bf..0dd12f1f0f 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 8af0847577..0cfefc20af 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 b9a1d301ad..24e9714d85 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 5275183da2..134de68111 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 5275183da2..134de68111 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 87863baf75..ce8d9807b2 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 54c190cf8a..c42bb0f974 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 f4051cd02c..dc28ae46be 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 91d5125ec0..467a2243be 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 75a94baa17..c095f67908 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 e71b3fc56a..30f0669dbf 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 1b6569ba3a..2d59de75aa 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 233f5fee25..62285ab56f 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 878e827d04..80026731fd 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 9ef1769250..db6392e416 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 d3ec4b0692..f060be9d9a 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 6bca25b330..5f1b608a36 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 c337882d9c..f29946bca7 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 c337882d9c..77d3f3f2aa 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 ffdfa56645..bc03a633c2 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 ffdfa56645..bc03a633c2 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 ffdfa56645..bc03a633c2 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 189d8a7955..ea6a00b240 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 bc4875d908..95b4e15aa7 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 9ca86eca9c..d7c603b86d 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 1b6e11f6f2..a2196871f0 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 d401675bcf..cddb9a40f1 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 4b6b42b024..8b53d95446 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 9ca86eca9c..2a2554db8b 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 b315d20508..6d9be86593 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 adde630a0b..35cdbef72f 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 9ee3fb7c06..2eb17d5889 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 8de7bde50d..d5043e188f 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 e2139e75f6..ceb6eab009 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 46c0553c28..fccd612bae 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 87863baf75..ce8d9807b2 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 4b1db77a35..1af8b3e283 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 ddd26e7399..d24d294f08 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 7961a1a481..8c599ac6d8 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 b315d20508..6d9be86593 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 3a65978aa3..69ea54370c 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 9a45bbb515..1ca9bd82fc 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 3da6d6d7ac..8bffe49dd0 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 9a45bbb515..1ca9bd82fc 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 7c26dea56e..6f739d72bf 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 65d629a35b..55d711de82 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 951cfb1ea4..cf55c12855 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 386d6261c6..0200a117ae 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 42873056f2..35361d5685 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 7b39af6979..7baa02be9b 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 e309831b3e..28f0886fd5 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 54c190cf8a..c42bb0f974 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 54c190cf8a..c42bb0f974 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 e309831b3e..28f0886fd5 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 54c190cf8a..c42bb0f974 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 a48591a3b4..91aefc3f2c 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 92c5ebc599..1e9d9e4ec8 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 94cb038885..a9e118ca3d 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 54c190cf8a..d812e7a5b6 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 8f8a368f9a..f84bcf7873 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 0bb654e7e2..8d7c515d62 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 8530783673..6ec5c275e4 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 4ccd2da381..4b706eb827 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 4ccd2da381..4b706eb827 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 508e46742f..27c77fa04e 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 4ccd2da381..4b706eb827 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 61004ff627..3393b17dab 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 c6a7e40e8c..ff37d4298e 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 52a6efc6fc..0e9f07e18a 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 7a6207fd45..f2461c5002 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 e680b2bd77..fc326592d6 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 e680b2bd77..fc326592d6 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 e680b2bd77..fc326592d6 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 72f2c493d4..ef983348ad 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 5275183da2..8567a08532 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 9cb04f6240..300a14ab74 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 1910b3e66b..4b8f3b3151 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 33365908bf..5f1a5c2ec8 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 358b096a64..f5a1f2f4ff 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 b6dc6d0b01..d6d818891b 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 b6dc6d0b01..aa4c98a4ba 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 8c9f0c13ae..dca793b5a0 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 015ad756f8..24ae8a553b 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 c1dc7c7d08..e2ff31efbe 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 1b4451edbe..a120670f38 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 6d44c6c1bd..bce8b7d105 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 c40830f123..141aa3d1fc 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 6bca25b330..e439b4eefe 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 6bca25b330..e439b4eefe 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 fe1472c54d..4b09b694b7 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 69af0984f7..d79f79d678 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 cfb558bf45..a18e4c748c 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 e1d5837f32..bf38c6a9b4 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 b1f4e7a2c8..5658a715a6 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 c3c2c8ca2f..1735986fbb 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 c5f0a90d6a..17a9353c5c 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 b7385a50d5..9ce8c92994 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 b7385a50d5..b9a207917f 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 fc2a891109..a4fc53556a 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 63c080e583..0000000000 --- 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 679e51ed81..0000000000 --- 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 06180c3a55..e4d2348788 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 3f6c2d868d..fe7c68a1cd 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 27668fcd48..936c30150c 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 8088d28329..b1551fdd0f 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 8088d28329..e88bdb8160 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 1cf3870a8e..0000000000 --- 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 a6a3973255..0000000000 --- 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 c1074df915..0000000000 --- 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 70fdc5b62c..0000000000 --- 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 2631c3c500..0000000000 --- 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 6632f056bd..0000000000 --- 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 cba788381e..0000000000 --- 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 0459b756d1..0000000000 --- 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 6baed366f6..a67e1131e9 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 8454aaa404..57bd186590 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 1d5b5bf393..a63890a480 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 21143f2ade..3c066236b1 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 29c75ae3c0..25525cd67f 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 29eec51ef2..7e0cadd012 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 7a25280d55..1374a73df1 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 e0adef1bf8..8fe80033ea 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 bf776029b9..14df30f719 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 94d6c26a1a..d4118999c5 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 5275183da2..49a6a171d5 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 5275183da2..134de68111 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 3c09f44ba9..8715c79e50 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 3c09f44ba9..10ef4832e3 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 b0cfdea75d..0000000000 --- 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 dec7090322..0000000000 --- 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 2857cd53c8..83f939a3fc 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 42294b7afb..4a09059884 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 d8d6c8bc1b..9356549fde 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 d8d6c8bc1b..656b3a162a 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 c094c08cd8..c41ce62ae3 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 c094c08cd8..ef6a1f0b13 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 c094c08cd8..ef6a1f0b13 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 4111aa07af..582308aaab 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 153e81b405..18384570d2 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 de43f2d3c4..5fb7639049 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 c0308c81f3..1107a2b73e 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 a285b80025..99a6249e53 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 a95069dc4f..7a5875f85d 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 81554ec707..78dfe4afb4 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 e3dbf81850..04de9e313d 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 71d1e2f8ae..297911c70d 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 c6d39781ee..47a2847ebf 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 8530783673..38b2727cc2 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 dfe3443761..b9884a9d37 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 297e1283e8..cd6c09a484 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 e05d4be8c9..a9cc45baa6 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 8530783673..96ee8d3687 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 9d6c9d9144..7a36ca7ebd 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 302109cf8a..4c9b985f9b 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 225c85e9c7..78ae8f7ccc 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 2b1a607883..124efa307d 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 502c18ab9d..1af3a0ceb5 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 88be39345b..b5857adf07 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 ebf43186be..9bdd3c3d2b 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 27d2504dd0..6369a33cd4 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 87863baf75..ce8d9807b2 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 32357f9f6a..03d55aa52e 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 e68759223c..a1db69fee0 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 f49d93620f..e3933bd5f2 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 22cd5d3a17..100961ee1d 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 032af0322b..bf87040811 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 6d8aeaf0b6..5c8de73505 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 b0e4af29a0..420b57f87a 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 e6a1cab77d..2a28bf6a97 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 7365072ea7..0e4c4388bb 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 cfe91e00bd..85bc44a05d 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 ae0f2d8b8b..953ed8e209 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 101d27df9d..68a6b71532 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 ae40e0bc8c..3847cdef21 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 62b3ae291f..ad92088a12 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 1d4078d2f7..e60ebf123e 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 5d059b9193..b3b2b223f9 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 fe6083c329..40296d2454 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 f65caf5222..f4381b6d7b 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 f861d52f2b..c65cec17ef 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 c76950179d..75fb45cf12 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 3d251c2906..f161897c5b 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 075f5d3225..0b11103a80 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 3084515233..a28e08548d 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 c1e683d942..73400e4695 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 c902676a5d..692ec589de 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 39ddf91c76..177eea2508 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 1e0455b96d..91d5aaf0be 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 43a08acc0a..79f681177d 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 fb148308e4..452e3b7a9d 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 44d29cb82d..ae3437e0bb 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 048cfbdfae..265ffed0f8 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 5132792cb7..1f11930594 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 c189204285..bcdaed34e7 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 0000000000..58ef91730e --- /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 20eec212ba..0000000000 --- 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 0000000000..d6e4a710da --- /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 0000000000..58ef91730e --- /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 15cd95ff2b..0000000000 --- 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 20eec212ba..0000000000 --- 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 0000000000..58ef91730e --- /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 20eec212ba..0000000000 --- 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 0000000000..23a69b9fd6 --- /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 0000000000..58ef91730e --- /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 ecdba44d21..0000000000 --- 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 20eec212ba..0000000000 --- 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 b8e243769f..5b19af4d65 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 ff3e827255..36e49b815f 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 40eb63ffcb..a43caf5c28 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 8630fab420..a0d134aa1b 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 6fb592117b..065dc197fa 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 107051df6c..6707e5eb3f 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 04df229f66..3f673141f1 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 75a02c5d3c..7c047b3941 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 4a6964f503..1ee7378d48 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 45fb771829..d9326eda28 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 72c659c952..a2b0d37e6b 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 477449e0e3..1c57c8719f 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 c00f3d093a..b0fe54ea68 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 36db304ef4..b9e53f771a 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 4fc91487f2..7be348935b 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 f67dbdcd03..c37018aa4f 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 3a03406f92..2d9dbc800b 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 99ced48433..5f3d6f270c 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 b9b3968473..9bc2659acd 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 19c4186622..0000000000 --- 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 c181c5dd02..0000000000 --- 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 f15f580272..0000000000 --- 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 2cdc81aacc..0000000000 --- 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 0000000000..08302930bc --- /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 0000000000..19de682c6c --- /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 0000000000..2b7322ad8e --- /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 0000000000..3492e799ff --- /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 8543cf976e..cbda76b39d 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 fe48ade26b..2c45f5eb04 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 90d81dd9a1..d6277056e8 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 545d7a4906..43b413c205 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 7c39b46396..42fef6ba94 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 f922199fb3..205727808e 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 350d5d1d45..ccd0da39ad 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 5f1f372b0a..9f7965de38 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 b7ef07afb2..427358a7d3 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 6d2938dcf3..ed58a05cce 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 dfca5b1eca..60fcb13207 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 3a90f98d99..fac0b4d813 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 0000000000..015e1a3c32 --- /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 0000000000..7be1c31076 --- /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 f7d531e119..2c0247f369 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 e9dbc1b640..eedbef6fb8 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 bca700b4ec..7f18f54000 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 920352a6ea..c33e91bc81 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 402ab38fb3..2ef0f71620 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 83ec6573df..034fdd58dc 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 9b38957101..b142798f4c 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 810fe64823..fd052368a2 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 f1b3612a4a..588b9fe2d6 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 75004742a2..27cca0039b 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 cadb17f570..85775be31a 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 e5ab4a1a85..04679696c0 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 fe1e5d1285..6215984b2c 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 5f6dd7f641..58143a3693 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 f766d14261..465ae7e15f 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 6cc0e57255..491d2e546a 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 18a4c360e2..495c5b7a34 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 fb45461701..9d5ef04abd 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 4036a1bf01..90d378d4c6 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 5edaf19442..45468f600c 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 128356ff8a..dc1dd61d44 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 e02c206778..93d9d1b82b 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 b311bfa38a..5778d1bad4 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 c2ac488e9b..e8c3739190 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 1650acadb5..f7a482dab2 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 4a268dd8e0..98faf410f2 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