Skip to content

Add golden test for Co<T> type where T must be explicitly completed#383

Open
copybara-service[bot] wants to merge 1 commit intomainfrom
test_864468461
Open

Add golden test for Co<T> type where T must be explicitly completed#383
copybara-service[bot] wants to merge 1 commit intomainfrom
test_864468461

Conversation

@copybara-service
Copy link

Add golden test for Co type where T must be explicitly completed

In the Clang AST, Co<T> will never try to complete the instantiation of T because it doesn't actually need the completed type. This means that if T is not completed elsewhere, Crubit will also think it's incomplete and raise an error because it needs T to be complete.

This change doesn't fix the issue, but demonstrates it happening. A followup change will ensure that Crubit manually attempts to complete the T type when it's reading from the clang AST, ensuring that Crubit won't complain about an incomplete T type that should obviously be completable, like StatusOr<int>.

In the Clang AST, `Co<T>` will never try to complete the instantiation of `T` because it doesn't actually need the completed type. This means that if `T` is not completed elsewhere, Crubit will also think it's incomplete and raise an error because it needs `T` to be complete.

This change doesn't fix the issue, but demonstrates it happening. A followup change will ensure that Crubit manually attempts to complete the `T` type when it's reading from the clang AST, ensuring that Crubit won't complain about an incomplete `T` type that should obviously be completable, like `StatusOr<int>`.

PiperOrigin-RevId: 864468461
@google-cla
Copy link

google-cla bot commented Feb 2, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants