-
-
Notifications
You must be signed in to change notification settings - Fork 141
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
Add missing generic constraints to generated methods #1216
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
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. |
6ea3d36
to
12511c2
Compare
There was a problem hiding this 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.
src/Riok.Mapperly/Descriptors/Mappings/UserMappings/UserDefinedNewInstanceGenericTypeMapping.cs
Show resolved
Hide resolved
🎉 This PR is included in version 3.5.1-next.1 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
🎉 This PR is included in version 3.5.1 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
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 aspartial TTarget Map<TSource, TTarget>(TSource source) { ... }
, which is invalid code, generic constraints need to be specified in partial implementation as well.Checklist