summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/gdscript_parser.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2019-06-03 14:01:07 +0200
committerGitHub <noreply@github.com>2019-06-03 14:01:07 +0200
commitb9dc2e7e4dd38621ef0dd07d208ffc5468954adb (patch)
treed32c83f57a61ff9e1e6fa697176d61297fc9f8a8 /modules/gdscript/gdscript_parser.cpp
parent0dac4d6db6553a90ed5e9daf06fe3a1cd3e3fb5f (diff)
parent2ad302cec4dc41db8cbb657b2e1946275967f1c4 (diff)
downloadredot-engine-b9dc2e7e4dd38621ef0dd07d208ffc5468954adb.tar.gz
Merge pull request #28099 from lupoDharkael/fix-completion
Fix code completion not working with class_name
Diffstat (limited to 'modules/gdscript/gdscript_parser.cpp')
-rw-r--r--modules/gdscript/gdscript_parser.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/gdscript/gdscript_parser.cpp b/modules/gdscript/gdscript_parser.cpp
index 9590009a54..922ee395dd 100644
--- a/modules/gdscript/gdscript_parser.cpp
+++ b/modules/gdscript/gdscript_parser.cpp
@@ -3497,7 +3497,7 @@ void GDScriptParser::_parse_class(ClassNode *p_class) {
_set_error("'class_name' is only valid for the main class namespace.");
return;
}
- if (self_path.empty()) {
+ if (self_path.begins_with("res://") && self_path.find("::") != -1) {
_set_error("'class_name' not allowed in built-in scripts.");
return;
}