mirror of
				https://github.com/godotengine/godot.git
				synced 2025-10-31 13:41:03 +00:00 
			
		
		
		
	Merge pull request #80964 from dalexeev/gds-allow-use-local-consts-as-types
GDScript: Allow use local constants as types
This commit is contained in:
		
						commit
						b6c4efe1b1
					
				
					 12 changed files with 236 additions and 122 deletions
				
			
		|  | @ -2291,9 +2291,7 @@ GDScriptParser::ExpressionNode *GDScriptParser::parse_identifier(ExpressionNode | |||
| 	IdentifierNode *identifier = alloc_node<IdentifierNode>(); | ||||
| 	complete_extents(identifier); | ||||
| 	identifier->name = previous.get_identifier(); | ||||
| #ifdef DEBUG_ENABLED | ||||
| 	identifier->suite = current_suite; | ||||
| #endif | ||||
| 
 | ||||
| 	if (current_suite != nullptr && current_suite->has_local(identifier->name)) { | ||||
| 		const SuiteNode::Local &declaration = current_suite->get_local(identifier->name); | ||||
|  | @ -4289,7 +4287,7 @@ String GDScriptParser::SuiteNode::Local::get_name() const { | |||
| 		case SuiteNode::Local::FOR_VARIABLE: | ||||
| 			return "for loop iterator"; | ||||
| 		case SuiteNode::Local::PATTERN_BIND: | ||||
| 			return "pattern_bind"; | ||||
| 			return "pattern bind"; | ||||
| 		case SuiteNode::Local::UNDEFINED: | ||||
| 			return "<undefined>"; | ||||
| 		default: | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Yuri Sizov
						Yuri Sizov