Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Null coalesce operator #5384

Closed
gian-ribo opened this issue Jan 30, 2024 · 4 comments
Closed

Null coalesce operator #5384

gian-ribo opened this issue Jan 30, 2024 · 4 comments

Comments

@gian-ribo
Copy link

Summary

VS Code can't recognise "??" operator. The deploy works.
In "Problems" tab I see:

  • Unexpected token '?'.
  • Expecting ':' but was: ';'

Steps To Reproduce:

  1. Write some code with ?? operator.
    Example: Account[] accList = maybeEmptyAccountList ?? new Account[]{};

Expected result

No problems appeares

Actual result

In "Problems" tab I see:

  • Unexpected token '?'.
  • Expecting ':' but was: ';'

Salesforce Extension Version in VS Code: v59.15.0

SFDX CLI Version: 7.209.6

OS and version: MacOS Sonoma 14.2.1

VS Code version: 1.85.2 (Universal)

@peternhale
Copy link
Contributor

peternhale commented Jan 30, 2024

@gian-ribo The apex language server will be updated when major release "Spring '24" is deployed to all customers. At that time the new operator will be recognized.

@diyer
Copy link
Collaborator

diyer commented Jan 30, 2024

@gian-ribo As Peter said, this will be supported with the next major version of extensions which is 60.0 which will likely be released in the coming weeks of February. Hope this helps.

@diyer
Copy link
Collaborator

diyer commented Feb 20, 2024

This is now available as part of version 60.0 of Salesforce extension

@diyer diyer closed this as completed Feb 20, 2024
@diyer
Copy link
Collaborator

diyer commented Feb 20, 2024

@gian-ribo Please test this and let us know if this is working as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants