apex-tmLanguage icon indicating copy to clipboard operation
apex-tmLanguage copied to clipboard

DML operations receive different TM scope when being applied to the result of Map.values().

Open scm04 opened this issue 5 years ago • 0 comments

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: example_code

  • 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 the support.function.apex TM scope while the other is being assigned the variable.other.readwrite.apex TM scope, as shown in these two images:

support.function.apex scope: dml_support_function

variable.other.readwrite.apex scope: dml_readwrite_variable

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.

scm04 avatar Nov 07 '19 17:11 scm04