When a for-loop variable has a qualified type annotation containing a dot (e.g. ClassName.EnumName), the parser only captures the first identifier as the VariableType and the .EnumName portion leaks into the Collection expression.
as in:
for t: MyClass.MyEnum in some_array:
pass
Expected AST:
- Variable = t
- VariableType = GDSubTypeNode with OverType = MyClass, Type = MyEnum
- Collection = some_array
Actual AST:
- Variable = t
- VariableType = GDSingleTypeNode("MyClass")
- Collection = .MyEnum in some_array
Tested on LSP branch
When a for-loop variable has a qualified type annotation containing a dot (e.g. ClassName.EnumName), the parser only captures the first identifier as the VariableType and the .EnumName portion leaks into the Collection expression.
as in:
Expected AST:
Actual AST:
Tested on LSP branch