-
Notifications
You must be signed in to change notification settings - Fork 26
Description
I am experiencing an issue with the IntelliSense auto-completion feature in my Visual Studio Code extension for MetaTrader 5 (MQL5) development.
Problem Description
Auto-completion suggests struct members correctly in the standard case but fails in a specific scenario involving the this keyword.
-
Normal Case (Working):
- When I type the name of a struct followed by a dot
., the members of that struct are correctly suggested. - Example:
mystruct.✅ → Suggestions appear.
- When I type the name of a struct followed by a dot
-
Problem Case 1 (Not Working):
- When I use the
thiskeyword (which is a pointer to the current class instance) followed by a dot.and the struct name, auto-completion fails after the second dot. - Example:
this.mystruct.❌ → No suggestions appear.
- When I use the
-
Problem Case 2 (Working but Invalid):
- If I use the pointer operator
->withthis(i.e.,this->mystruct.), auto-completion does work and suggests the struct members correctly. - However, this syntax is invalid in MQL5 and results in compilation errors:
'>' - operand expected'-' - illegal operation use
- If I use the pointer operator
Summary of the Issue
The correct, error-free syntax this.mystruct. does not trigger auto-completion, while the incorrect syntax this->mystruct. does. This forces developers to manually type all member names, reducing productivity and increasing the chance of errors.
Expected Behavior
IntelliSense should provide auto-completion for struct members when using the valid this.mystruct. syntax, just as it does for a plain struct variable.
Request
Could you please investigate why the this. syntax breaks the auto-completion chain and provide a fix so that it works as expected?
Thank you for your time and assistance.
Best regards,