You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-06 12:20:30 +00:00
GDScript: Don't allow builtin type names as identifiers
This commit is contained in:
@@ -175,6 +175,11 @@ Error GDScriptAnalyzer::check_native_member_name_conflict(const StringName &p_me
|
||||
return ERR_PARSE_ERROR;
|
||||
}
|
||||
|
||||
if (GDScriptParser::get_builtin_type(p_member_name) != Variant::VARIANT_MAX) {
|
||||
push_error(vformat(R"(The member "%s" cannot have the same name as a builtin type.)", p_member_name), p_member_node);
|
||||
return ERR_PARSE_ERROR;
|
||||
}
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user