Skip to content

fix(compiler-cli): generic types not filled out correctly in type check block#67707

Merged
mattrbeck merged 1 commit into
angular:mainfrom
crisbeto:67704/generic-emit
Mar 17, 2026
Merged

fix(compiler-cli): generic types not filled out correctly in type check block#67707
mattrbeck merged 1 commit into
angular:mainfrom
crisbeto:67704/generic-emit

Conversation

@crisbeto

Copy link
Copy Markdown
Member

Fixes a regression caused by the recent TCB changes where we moved the type parameter processing earlier in the pipeline and stopped properly accounting for the TcbGenericContextBehavior.

Fixes #67704.

@crisbeto crisbeto added action: review The PR is still awaiting reviews from at least one requested reviewer target: patch This PR is targeted for the next patch release labels Mar 16, 2026
@angular-robot angular-robot Bot added the area: compiler Issues related to `ngc`, Angular's template compiler label Mar 16, 2026
@ngbot ngbot Bot added this to the Backlog milestone Mar 16, 2026
@crisbeto crisbeto requested review from atscott and mattrbeck March 16, 2026 17:14
@crisbeto crisbeto marked this pull request as ready for review March 16, 2026 17:14
Comment thread packages/compiler-cli/src/ngtsc/typecheck/src/tcb_adapter.ts
…ck block

Fixes a regression caused by the recent TCB changes where we moved the type parameter processing earlier in the pipeline and stopped properly accounting for the `TcbGenericContextBehavior`.

Fixes angular#67704.
@crisbeto crisbeto force-pushed the 67704/generic-emit branch from 869d14b to 58cc4a6 Compare March 16, 2026 19:52
@crisbeto crisbeto added action: global presubmit The PR is in need of a google3 global presubmit and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Mar 16, 2026
@crisbeto

Copy link
Copy Markdown
Member Author

Passing TGP

@crisbeto crisbeto added action: merge The PR is ready for merge by the caretaker and removed action: global presubmit The PR is in need of a google3 global presubmit labels Mar 17, 2026
@mattrbeck mattrbeck merged commit 9769560 into angular:main Mar 17, 2026
23 checks passed
@mattrbeck

Copy link
Copy Markdown
Member

This PR was merged into the repository. The changes were merged into the following branches:

crisbeto added a commit to crisbeto/angular that referenced this pull request Apr 7, 2026
Fixes an error that was heppning when a generic param has type parameters of its own. There were a few different issues going on:
1. In angular#67707 I had changed a bit how we pass the `genericContextBehavior` which ended up ignoring the `useContextGenericType` option from the environment.
2. All directives depend on themselves, but we were overridding the `genericContextBehavior` for the directive being processed.
3. The type translator wasn't handling type parameter declarations. Technically we shouldn't be able to hit a code path that has a type parameter, however it's also easy enough to handle so we might as well.

Relates to angular#67704.
atscott pushed a commit that referenced this pull request Apr 7, 2026
Fixes an error that was heppning when a generic param has type parameters of its own. There were a few different issues going on:
1. In #67707 I had changed a bit how we pass the `genericContextBehavior` which ended up ignoring the `useContextGenericType` option from the environment.
2. All directives depend on themselves, but we were overridding the `genericContextBehavior` for the directive being processed.
3. The type translator wasn't handling type parameter declarations. Technically we shouldn't be able to hit a code path that has a type parameter, however it's also easy enough to handle so we might as well.

Relates to #67704.
atscott pushed a commit that referenced this pull request Apr 7, 2026
Fixes an error that was heppning when a generic param has type parameters of its own. There were a few different issues going on:
1. In #67707 I had changed a bit how we pass the `genericContextBehavior` which ended up ignoring the `useContextGenericType` option from the environment.
2. All directives depend on themselves, but we were overridding the `genericContextBehavior` for the directive being processed.
3. The type translator wasn't handling type parameter declarations. Technically we shouldn't be able to hit a code path that has a type parameter, however it's also easy enough to handle so we might as well.

Relates to #67704.

(cherry picked from commit ab061a7)
@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 Apr 17, 2026
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 target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Project no longer compiles after upgrading from 21.2.2 to 21.2.3

4 participants