Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.x] GDScript: Infer variable types on release #57851

Merged
merged 1 commit into from
Feb 9, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions modules/gdscript/gdscript_parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2943,9 +2943,7 @@ void GDScriptParser::_parse_block(BlockNode *p_block, bool p_static) {
if (tokenizer->get_token() == GDScriptTokenizer::TK_COLON) {
if (tokenizer->get_token(1) == GDScriptTokenizer::TK_OP_ASSIGN) {
lv->datatype = DataType();
#ifdef DEBUG_ENABLED
lv->datatype.infer_type = true;
#endif
tokenizer->advance();
} else if (!_parse_type(lv->datatype)) {
_set_error("Expected a type for the variable.");
Expand Down Expand Up @@ -4905,9 +4903,7 @@ void GDScriptParser::_parse_class(ClassNode *p_class) {
if (tokenizer->get_token() == GDScriptTokenizer::TK_COLON) {
if (tokenizer->get_token(1) == GDScriptTokenizer::TK_OP_ASSIGN) {
member.data_type = DataType();
#ifdef DEBUG_ENABLED
member.data_type.infer_type = true;
#endif
tokenizer->advance();
} else if (!_parse_type(member.data_type)) {
_set_error("Expected a type for the class variable.");
Expand Down Expand Up @@ -5149,9 +5145,7 @@ void GDScriptParser::_parse_class(ClassNode *p_class) {
if (tokenizer->get_token() == GDScriptTokenizer::TK_COLON) {
if (tokenizer->get_token(1) == GDScriptTokenizer::TK_OP_ASSIGN) {
constant.type = DataType();
#ifdef DEBUG_ENABLED
constant.type.infer_type = true;
#endif
tokenizer->advance();
} else if (!_parse_type(constant.type)) {
_set_error("Expected a type for the class constant.");
Expand Down