diff options
3 files changed, 6 insertions, 1 deletions
diff --git a/modules/gdscript/gdscript_analyzer.cpp b/modules/gdscript/gdscript_analyzer.cpp index 96c35516bc..5ce01a08bf 100644 --- a/modules/gdscript/gdscript_analyzer.cpp +++ b/modules/gdscript/gdscript_analyzer.cpp @@ -731,7 +731,7 @@ GDScriptParser::DataType GDScriptAnalyzer::resolve_datatype(GDScriptParser::Type  		}  	}  	if (!result.is_set()) { -		push_error(vformat(R"("%s" was not found in the current scope.)", first), p_type); +		push_error(vformat(R"(Could not find type "%s" in the current scope.)", first), p_type);  		return bad_type;  	} diff --git a/modules/gdscript/tests/scripts/analyzer/errors/not_found_type.gd b/modules/gdscript/tests/scripts/analyzer/errors/not_found_type.gd new file mode 100644 index 0000000000..1644295b38 --- /dev/null +++ b/modules/gdscript/tests/scripts/analyzer/errors/not_found_type.gd @@ -0,0 +1,3 @@ +func test(): +	var foo: Foo +	print('not ok') diff --git a/modules/gdscript/tests/scripts/analyzer/errors/not_found_type.out b/modules/gdscript/tests/scripts/analyzer/errors/not_found_type.out new file mode 100644 index 0000000000..3f6c2d868d --- /dev/null +++ b/modules/gdscript/tests/scripts/analyzer/errors/not_found_type.out @@ -0,0 +1,2 @@ +GDTEST_ANALYZER_ERROR +Could not find type "Foo" in the current scope.  |