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

Functions called with optional chaining are missing method coloration #1948

Open
1 of 2 tasks
Samuel-Therrien-Beslogic opened this issue Oct 30, 2023 · 0 comments
Open
1 of 2 tasks
Labels

Comments

@Samuel-Therrien-Beslogic
Copy link

Samuel-Therrien-Beslogic commented Oct 30, 2023

🐞 bug report

Is this a regression?

No. Using method optional chaining didn't use to be possible.

Description

As title says, see example image:
image

Bug Type

What does this bug affect

  • Angular Language Service VSCode extension
  • Angular Language Service server

Reproduction

Steps to reproduce the behavior:

  1. Create a component with HTML template
  2. Add a public property bar: (() => void) | undefined
  3. Add to the template:
<div (foo)="bar()"></div>
<div (foo)="bar?.()"></div>
  1. See that bar?.() isn't using the method coloring (yellow in my case), but instead the default property coloring (blue in my case)

Expected behavior

Methods using optional chaining should be colored like methods not using optional chaining.

Logs

Log file gives us deep insight into the behavior and performance of the extension. If the issue is a performance
problem or an error occured, please provide the output of the log file below.

Set Angular Log level to verbose.



(I don't think logs are relevant here, but can activate and post if asked)

Screenshots

If applicable, add screenshots to help explain your problem.

See above

🌍 Your Environment

Angular Version:




     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/
    

Angular CLI: 16.1.8
Node: 18.14.0
Package Manager: npm 9.4.2
OS: win32 x64

Angular: 16.1.9
... common, compiler-cli, core, forms, language-service   
... platform-browser, platform-browser-dynamic, router    

Package                         Version
--------------------------------------------------------- 
@angular-devkit/architect       0.1601.8
@angular-devkit/build-angular   16.1.8
@angular-devkit/core            16.2.8
@angular-devkit/schematics      16.2.8
@angular/cdk                    16.1.8
@angular/cli                    16.1.8
@angular/material               16.1.8
@schematics/angular             16.2.8
ng-packagr                      16.1.0
rxjs                            7.8.1
typescript                      4.9.5

Extension Version:




VSCode Version:



1.83.1 (user setup)

Operating System:



Windows 11 Version	10.0.22621 Build 22621

Extension options:



defaults

Anything else relevant?

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

No branches or pull requests

1 participant