Skip to content

fix(compiler-cli): display proper function in NG8117 message #62842

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

cexbrayat
Copy link
Member

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.dev application / infrastructure changes
  • Other... Please describe:

What is the current behavior?

The diagnostic was displaying 'Function in text interpolation should be invoked: ect Object]()

What is the new behavior?

The diagnostic displays `'Function in text interpolation should be invoked: firstName()'.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@pullapprove pullapprove bot requested a review from atscott July 27, 2025 17:21
@angular-robot angular-robot bot added the area: compiler Issues related to `ngc`, Angular's template compiler label Jul 27, 2025
@ngbot ngbot bot added this to the Backlog milestone Jul 27, 2025
@JoostK
Copy link
Member

JoostK commented Jul 28, 2025

'Function in text interpolation should be invoked: ect Object]()

This seems to indicate a larger problem at play, where the original source seems to have been [object Object]?

The diagnostic was displaying `'Function in text interpolation should be invoked: ect Object]()` instead of `'Function in text interpolation should be invoked: firstName()'.
@cexbrayat cexbrayat force-pushed the fix/ng8117-message branch from a713ebd to c60f3bb Compare July 28, 2025 09:52
@cexbrayat
Copy link
Member Author

@JoostK @JeanMeche I removed the source.toString() call to only rely on expression.name

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: compiler Issues related to `ngc`, Angular's template compiler
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants