apex-tmLanguage
apex-tmLanguage copied to clipboard
DML operations receive different TM scope when being applied to the result of Map.values().
Details
What editor are you seeing the problem in? (e.g. Atom, Visual Studio Code, etc.)
- Visual Studio Code
What version of the editor are you using?
- 1.39.2 Edit: I updated VS Code to version 1.40.0 today and confirmed that this is still an issue in that version as well.
What color theme are you using?
-
Sublime MavensMate Monokai
from the Sublime MavensMate Monokai for Apex extension, but as the issue is with the textMate scopes, it should be reproducible in other color themes as well.
Reproduction
-
This can be reproduced by opening a new file and adding some code such as this:
-
Once the code is in place, open the command palette and run the
Developer: Inspect TM Scopes
command. Place the mouse cursor next to each of the DML operations and it will show that one is being assigned thesupport.function.apex
TM scope while the other is being assigned thevariable.other.readwrite.apex
TM scope, as shown in these two images:
support.function.apex
scope:
variable.other.readwrite.apex
scope:
I confirmed that this is true for all of the support function keywords (delete, execute, finish, insert, start, undelete, update, upsert
). If this is not the right place for this kind of issue, let me know where to take it and I will be glad to submit it at the right place.