Merge pull request #73709 from vonagam/fix-error-message-unfound-type

GDScript: Fix error message for unfound type
This commit is contained in:
Rémi Verschelde 2023-02-21 23:36:29 +01:00
commit 56622b8ec3
No known key found for this signature in database
GPG Key ID: C3336907360768E1
3 changed files with 6 additions and 1 deletions

View File

@ -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;
}

View File

@ -0,0 +1,3 @@
func test():
var foo: Foo
print('not ok')

View File

@ -0,0 +1,2 @@
GDTEST_ANALYZER_ERROR
Could not find type "Foo" in the current scope.