Skip to content

Conversation

@eneajaho
Copy link
Contributor

@eneajaho eneajaho commented Jul 17, 2024

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • angular.io application / infrastructure changes
  • Other... Please describe:

What is the current behavior?

When you try to check the type of a nested function call or get quick info about it in the language service, nothing will be returned

Issue Number: #56476

What is the new behavior?

Correct type gets returned.

Does this PR introduce a breaking change?

  • No

Other information

Thanks to @atscott for finding the culprit (263feba) and the one line fix

@angular-robot angular-robot bot added the area: core Issues related to the framework runtime label Jul 17, 2024
@ngbot ngbot bot added this to the Backlog milestone Jul 17, 2024
@eneajaho eneajaho force-pushed the fix/nested-function-calls-ls branch 2 times, most recently from 8402b07 to 0d8c41a Compare July 17, 2024 01:28
@eneajaho eneajaho marked this pull request as ready for review July 17, 2024 01:29
@pullapprove pullapprove bot requested review from AndrewKushnir and dylhunn July 17, 2024 01:29
@eneajaho eneajaho changed the title fix(core): correctly get the type of nested function call expressions fix(compiler-cli): correctly get the type of nested function call expressions Jul 17, 2024
@eneajaho eneajaho force-pushed the fix/nested-function-calls-ls branch from 0d8c41a to 5266167 Compare July 17, 2024 01:30
@JeanMeche JeanMeche requested review from atscott and crisbeto and removed request for AndrewKushnir and dylhunn July 17, 2024 13:48
@atscott atscott added action: merge The PR is ready for merge by the caretaker target: patch This PR is targeted for the next patch release and removed action: merge The PR is ready for merge by the caretaker labels Jul 22, 2024
@atscott
Copy link
Contributor

atscott commented Jul 22, 2024

Looks like this broke the nullish coalescing extended diagnostic

warning TS-998102: [ngtsc] The left side of this nullish coalescing operation does not include 'null' or 'undefined' in its type, therefore the '??' operator can be safely removed.

3     [class.extra-space]="filterText !== '' && (contacts?.length ?? 0) > 0"
                                                 ~~~~~~~~~~~~~~~~~~~~~

(contacts is Thing | undefined)
....

warning TS-998107: [ngtsc] The left side of this optional chain operation does not include 'null' or 'undefined' in its type, therefore the '?.' operator can be replaced with the '.' operator.

79           {{menuItem.appliedFilter?.config?.displayName}}
                                               ~~~~~~~~~~~

@atscott atscott added the action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews label Jul 22, 2024
@eneajaho eneajaho force-pushed the fix/nested-function-calls-ls branch from 5266167 to 7dd98a5 Compare September 21, 2024 00:02
@angular-robot angular-robot bot removed the area: core Issues related to the framework runtime label Sep 21, 2024
@ngbot ngbot bot removed this from the Backlog milestone Sep 21, 2024
…ressions

This PR fixes a bug where the type of a nested function call expression was incorrectly being returned as null.
@eneajaho eneajaho force-pushed the fix/nested-function-calls-ls branch from 7dd98a5 to c03e580 Compare September 21, 2024 01:07
@eneajaho eneajaho requested a review from atscott September 21, 2024 01:11
@pkozlowski-opensource pkozlowski-opensource added the area: compiler Issues related to `ngc`, Angular's template compiler label Sep 23, 2024
@ngbot ngbot bot added this to the Backlog milestone Sep 23, 2024
@atscott atscott added action: merge The PR is ready for merge by the caretaker and removed action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews labels Sep 25, 2024
@atscott atscott removed the request for review from crisbeto September 26, 2024 16:41
@alxhub
Copy link
Member

alxhub commented Sep 26, 2024

This PR was merged into the repository by commit 39ccaf4.

The changes were merged into the following branches: main, 18.2.x

alxhub pushed a commit that referenced this pull request Sep 26, 2024
…ressions (#57010)

This PR fixes a bug where the type of a nested function call expression was incorrectly being returned as null.

PR Close #57010
@alxhub alxhub closed this in 39ccaf4 Sep 26, 2024
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Oct 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker area: compiler Issues related to `ngc`, Angular's template compiler target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants