Skip to content

fix(compiler): fix Elements not making a new ParseSourceSpan - #31190

Closed
ayazhafiz wants to merge 1 commit into
angular:masterfrom
ayazhafiz:fix/element-parsespan-patch
Closed

ayazhafiz wants to merge 1 commit into
angular:masterfrom
ayazhafiz:fix/element-parsespan-patch

Conversation

@ayazhafiz

Copy link
Copy Markdown
Contributor

Change the Element constructor in r3_ast to create a new ParseSourceSpan when regenerating it rather than extending an object, which does not contain the overloaded toString().

Same as #31153. Retrying here because tests on the other PR failed, I think because it was a patch on the master repo.

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?

Parsing a template that has an element with adjacent start and end tags creates an object to represent the element ParseSourceSpan rather than a new instance of a ParseSourceSpan, which does not make the overloaded ParseSourceSpan.toString accessible.

What is the new behavior?

Create a new ParseSourceSpan instance.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

Change the Element constructor in r3_ast to create a new ParseSourceSpan when regenerating it rather than extending an object, which does not contain the overloaded toString().
@ayazhafiz
ayazhafiz requested a review from a team June 21, 2019 15:59
@ayazhafiz
ayazhafiz requested a review from alxhub June 21, 2019 15:59
@ayazhafiz ayazhafiz added area: compiler Issues related to `ngc`, Angular's template compiler target: major This PR is targeted for the next major release type: bug/fix labels Jun 21, 2019
@ngbot ngbot Bot added this to the needsTriage milestone Jun 21, 2019
@ayazhafiz ayazhafiz added the action: merge The PR is ready for merge by the caretaker label Jun 21, 2019
@kara kara closed this in 7035f22 Jun 21, 2019
@ayazhafiz
ayazhafiz deleted the fix/element-parsespan-patch branch June 21, 2019 19:16
@angular-automatic-lock-bot

Copy link
Copy Markdown

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 Sep 15, 2019
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 cla: yes target: major This PR is targeted for the next major release type: bug/fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants