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: generate correct nullability for external array elements #715

Merged
merged 1 commit into from
Sep 4, 2023

Conversation

TimothyMakkison
Copy link
Collaborator

@TimothyMakkison TimothyMakkison commented Sep 1, 2023

Generate correct nullability for external array elements

Description

Using ImplementsGeneric on external types will erase the nullable annotation of an array element type. This is used in CollectionInfosBuilder.GetEnumeratedType where the resulting enumerated type is used by EnumerableMappingBuilder to map the element types of two collections.

This caused a rare issue where an array collection would be treated as if it had a nullable element type.

Fixes #690

Checklist

  • The existing code style is followed
  • The commit message follows our guidelines
  • Performed a self-review of my code
  • Hard-to-understand areas of my code are commented

@codecov
Copy link

codecov bot commented Sep 1, 2023

Codecov Report

Merging #715 (3b461a5) into main (44b5df9) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main     #715   +/-   ##
=======================================
  Coverage   91.15%   91.15%           
=======================================
  Files         198      198           
  Lines        6555     6557    +2     
  Branches      815      816    +1     
=======================================
+ Hits         5975     5977    +2     
  Misses        389      389           
  Partials      191      191           
Files Changed Coverage Δ
...y/Descriptors/Enumerables/CollectionInfoBuilder.cs 96.64% <100.00%> (+0.02%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@latonz latonz enabled auto-merge (squash) September 1, 2023 18:44
@latonz latonz disabled auto-merge September 1, 2023 18:51
@latonz latonz merged commit 7bf8104 into riok:main Sep 4, 2023
19 checks passed
@github-actions
Copy link

github-actions bot commented Sep 5, 2023

🎉 This PR is included in version 3.2.0-next.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions
Copy link

🎉 This PR is included in version 3.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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.

Nullable error when target type comes from external reference
2 participants