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

Add missing generic constraints to generated methods #1216

Merged
merged 2 commits into from
Apr 8, 2024

Conversation

trejjam
Copy link
Contributor

@trejjam trejjam commented Apr 6, 2024

Add missing generic constraints to generated methods

Description

A method partial TTarget Map<TSource, TTarget>(TSource source) where TSource : class, TTarget : class; is now generated as
partial TTarget Map<TSource, TTarget>(TSource source) { ... }, which is invalid code, generic constraints need to be specified in partial implementation as well.

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
  • The documentation is updated (as applicable)
  • Unit tests are added/updated
  • Integration tests are added/updated (as applicable, especially if feature/bug depends on roslyn or framework version in use)

Copy link

codecov bot commented Apr 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.37%. Comparing base (1e78844) to head (570dedf).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1216      +/-   ##
==========================================
+ Coverage   91.33%   91.37%   +0.04%     
==========================================
  Files         234      234              
  Lines        8218     8259      +41     
  Branches     1026     1034       +8     
==========================================
+ Hits         7506     7547      +41     
  Misses        464      464              
  Partials      248      248              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@trejjam trejjam force-pushed the feature/generic-constraints-signature branch from 6ea3d36 to 12511c2 Compare April 6, 2024 22:32
Copy link
Contributor

@latonz latonz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix, embarrassing that I didn't spot this earlier.

@latonz latonz enabled auto-merge (squash) April 8, 2024 15:18
@latonz latonz merged commit d6cfd93 into riok:main Apr 8, 2024
18 of 19 checks passed
Copy link

github-actions bot commented Apr 9, 2024

🎉 This PR is included in version 3.5.1-next.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@trejjam trejjam deleted the feature/generic-constraints-signature branch April 9, 2024 08:42
Copy link

🎉 This PR is included in version 3.5.1 🎉

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.

2 participants