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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Ivy] Cannot read property 'kind' of undefined #30929

Closed
pshurygin opened this issue Jun 8, 2019 · 0 comments

Comments

@pshurygin
Copy link

commented Jun 8, 2019

馃悶 bug report

Affected Package

Probably angular compiler

Is this a regression?

Not an issue without ivy

Description

Trying to build an app using ivy and langular v8.1.0-next.1 with fullTemplateTypeCheck option set to true. There is an error during typechecking process. Changing fullTemplateTypeCheck to false solves the issue.

馃敩 Minimal Reproduction

Not sure how it can be reproduced, as there is no info in the error message pointing to some specific part of our app, which is rather large and closed-source. But i guess the error message could give some info to angular team members.

馃敟 Exception or Error


ERROR in : TypeError: Cannot read property 'kind' of undefined
    at Object.skipPartiallyEmittedExpressions (D:\Solomoto\impl\solo\SolomotoWebRole\node_modules\typescript\lib\typescript.js:1365
9:21)
    at Object.parenthesizeExpressionForList (D:\Solomoto\impl\solo\SolomotoWebRole\node_modules\typescript\lib\typescript.js:64337:
36)
    at Object.createPropertyAssignment (D:\Solomoto\impl\solo\SolomotoWebRole\node_modules\typescript\lib\typescript.js:62507:31)
    at D:\Solomoto\impl\solo\SolomotoWebRole\node_modules\@angular\compiler-cli\src\ngtsc\typecheck\src\type_check_block.js:789:23
    at Array.map ()
    at tcbCallTypeCtor (D:\Solomoto\impl\solo\SolomotoWebRole\node_modules\@angular\compiler-cli\src\ngtsc\typecheck\src\type_check
_block.js:784:32)
    at TcbDirectiveOp.execute (D:\Solomoto\impl\solo\SolomotoWebRole\node_modules\@angular\compiler-cli\src\ngtsc\typecheck\src\typ
e_check_block.js:309:28)
    at Scope.executeOp (D:\Solomoto\impl\solo\SolomotoWebRole\node_modules\@angular\compiler-cli\src\ngtsc\typecheck\src\type_check
_block.js:641:26)
    at Scope.render (D:\Solomoto\impl\solo\SolomotoWebRole\node_modules\@angular\compiler-cli\src\ngtsc\typecheck\src\type_check_bl
ock.js:580:22)
    at Object.generateTypeCheckBlock (D:\Solomoto\impl\solo\SolomotoWebRole\node_modules\@angular\compiler-cli\src\ngtsc\typecheck\
src\type_check_block.js:43:37)
    at TypeCheckFile.addTypeCheckBlock (D:\Solomoto\impl\solo\SolomotoWebRole\node_modules\@angular\compiler-cli\src\ngtsc\typechec
k\src\type_check_file.js:47:41)
    at TypeCheckContext.addTemplate (D:\Solomoto\impl\solo\SolomotoWebRole\node_modules\@angular\compiler-cli\src\ngtsc\typecheck\s
rc\context.js:98:36)
    at ComponentDecoratorHandler.typeCheck (D:\Solomoto\impl\solo\SolomotoWebRole\node_modules\@angular\compiler-cli\src\ngtsc\anno
tations\src\component.js:308:21)
    at D:\Solomoto\impl\solo\SolomotoWebRole\node_modules\@angular\compiler-cli\src\ngtsc\transform\src\compilation.js:330:43
    at Map.forEach ()
    at IvyCompilation.typeCheck (D:\Solomoto\impl\solo\SolomotoWebRole\node_modules\@angular\compiler-cli\src\ngtsc\transform\src\c
ompilation.js:323:29)

馃實 Your Environment

Angular Version:


        "@angular/animations": "8.1.0-next.1",
        "@angular/cdk": "8.0.0",
        "@angular/common": "8.1.0-next.1",
        "@angular/core": "8.1.0-next.1",
        "@angular/forms": "8.1.0-next.1",
        "@angular/material": "8.0.0",
        "@angular/platform-browser": "8.1.0-next.1",
        "@angular/router": "8.0.0",
        "@angular/language-service": "8.1.0-next.1",
        "@angular/compiler": "8.1.0-next.1",
        "@angular/compiler-cli": "8.1.0-next.1",
        "@ngtools/webpack": "8.0.2",
        "typescript": "3.4.5",

@ngbot ngbot bot modified the milestone: needsTriage Jun 8, 2019

JoostK added a commit to JoostK/angular that referenced this issue Jun 9, 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 angular#30076, angular#30929
JoostK added a commit to JoostK/angular that referenced this issue Jun 9, 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 angular#30076, angular#30929
JoostK added a commit to JoostK/angular that referenced this issue Jun 9, 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 angular#30076, angular#30929

@ngbot ngbot bot modified the milestones: needsTriage, Backlog Jun 9, 2019

JoostK added a commit to JoostK/angular that referenced this issue Jun 9, 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 angular#30076, angular#30929
JoostK added a commit to JoostK/angular that referenced this issue Jun 10, 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 angular#30076
Fixes angular#30929
JoostK added a commit to JoostK/angular that referenced this issue Jun 22, 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 angular#30076
Fixes angular#30929
JoostK added a commit to JoostK/angular that referenced this issue Jul 15, 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 angular#30076
Fixes angular#30929
JoostK added a commit to JoostK/angular that referenced this issue Jul 15, 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 angular#30076
Fixes angular#30929
JoostK added a commit to JoostK/angular that referenced this issue Jul 16, 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 angular#30076
Fixes angular#30929
JoostK added a commit to JoostK/angular that referenced this issue 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 angular#30076
Fixes angular#30929
ngdevelop-tech added a commit to ngdevelop-tech/angular that referenced this issue 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 issue 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can鈥檛 perform that action at this time.