Skip to content

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

Closed
ayazhafiz wants to merge 1 commit into
masterfrom
element-parsespan-patch
Closed

ayazhafiz wants to merge 1 commit into
masterfrom
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().

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

@ayazhafiz
ayazhafiz requested a review from a team June 20, 2019 06:05
@ayazhafiz
ayazhafiz requested a review from alxhub June 20, 2019 06:06
@ayazhafiz ayazhafiz self-assigned this Jun 20, 2019
@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 20, 2019
@ngbot ngbot Bot added this to the needsTriage milestone Jun 20, 2019
@alxhub

alxhub commented Jun 20, 2019

Copy link
Copy Markdown
Member

Is there a way we can add a test to verify the correct behavior?

@alxhub alxhub left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

^ above

@ayazhafiz

Copy link
Copy Markdown
Contributor Author

Is there a way we can add a test to verify the correct behavior?

Done. Let me know if there's a more ergonomic or appropriate place to put the test.

@ayazhafiz
ayazhafiz requested a review from alxhub June 20, 2019 18:19
@ayazhafiz
ayazhafiz force-pushed the element-parsespan-patch branch 2 times, most recently from fc70a2c to a38dcf2 Compare June 21, 2019 01:06
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

Copy link
Copy Markdown
Contributor Author

Closing, replaced by #31190

@ayazhafiz ayazhafiz reopened this Jun 21, 2019
@ayazhafiz ayazhafiz closed this Jun 21, 2019
@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
@IgorMinar
IgorMinar deleted the element-parsespan-patch branch June 9, 2020 20:13
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

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