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

fix(ivy): handle empty bindings in template type checker #31594

Closed
wants to merge 2 commits into from

Conversation

@JoostK
Copy link
Member

commented Jul 16, 2019

When a template contains a binding without a value, the template parser
creates an EmptyExpr node. This would previously be translated into
an undefined value, which would cause a crash downstream as undefined
is not included in the allowed type, so it was not handled properly.

This commit prevents the crash by returning an actual expression for empty
bindings.

Fixes #30076
Fixes #30929


This is a new PR for #30938 without the breaking changes regarding the AstVisitor.

@AndrewKushnir

This comment has been minimized.

Copy link
Contributor

commented Jul 16, 2019

@AndrewKushnir

This comment has been minimized.

Copy link
Contributor

commented Jul 17, 2019

FYI VE Presubmit is successful, Ivy Presubmit looks normal.

@alxhub
alxhub approved these changes Aug 20, 2019
fix(ivy): handle empty bindings in template type checker
When a template contains a binding without a value, the template parser
creates an `EmptyExpr` node. This would previously be translated into
an `undefined` value, which would cause a crash downstream as `undefined`
is not included in the allowed type, so it was not handled properly.

This commit prevents the crash by returning an actual expression for empty
bindings.

Fixes #30076
Fixes #30929

@JoostK JoostK force-pushed the JoostK:ivy-ttc-empty-bindings branch from 2a717b4 to 3f6b1e5 Aug 20, 2019

@AndrewKushnir

This comment has been minimized.

Copy link
Contributor

commented Aug 20, 2019

@AndrewKushnir

This comment has been minimized.

Copy link
Contributor

commented Aug 21, 2019

FYI VE and Ivy presubmits look normal.

ngdevelop-tech added a commit to ngdevelop-tech/angular that referenced this pull request Aug 27, 2019
fix(ivy): handle empty bindings in template type checker (angular#31594)
When a template contains a binding without a value, the template parser
creates an `EmptyExpr` node. This would previously be translated into
an `undefined` value, which would cause a crash downstream as `undefined`
is not included in the allowed type, so it was not handled properly.

This commit prevents the crash by returning an actual expression for empty
bindings.

Fixes angular#30076
Fixes angular#30929

PR Close angular#31594
sabeersulaiman added a commit to sabeersulaiman/angular that referenced this pull request Sep 6, 2019
fix(ivy): handle empty bindings in template type checker (angular#31594)
When a template contains a binding without a value, the template parser
creates an `EmptyExpr` node. This would previously be translated into
an `undefined` value, which would cause a crash downstream as `undefined`
is not included in the allowed type, so it was not handled properly.

This commit prevents the crash by returning an actual expression for empty
bindings.

Fixes angular#30076
Fixes angular#30929

PR Close angular#31594

@JoostK JoostK deleted the JoostK:ivy-ttc-empty-bindings branch Sep 15, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.