Skip to content

Ensure that one-way implicit conversions also work for value types#287

Merged
StefH merged 5 commits intozzzprojects:masterfrom
alexweav:check-both-ways
Aug 18, 2019
Merged

Ensure that one-way implicit conversions also work for value types#287
StefH merged 5 commits intozzzprojects:masterfrom
alexweav:check-both-ways

Conversation

@alexweav
Copy link
Copy Markdown
Contributor

My previous PR (#285) fixed a couple issues with one-way implicit conversions, but we still aren't properly checking which type is promotable when comparing value types.

Added some extra logic to fix this. When comparing a value type against a class, we now check for implicit conversions both ways (value type to class, and class to value type). This was already fixed for non-value types, which are handled in a different section of the logic.

Updated the test to hit both the value-type case and the non-value-type case.

@codecov
Copy link
Copy Markdown

codecov Bot commented Aug 16, 2019

Codecov Report

Merging #287 into master will increase coverage by 0.29%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #287      +/-   ##
=========================================
+ Coverage    87.2%   87.5%   +0.29%     
=========================================
  Files          42      42              
  Lines        4266    4280      +14     
=========================================
+ Hits         3720    3745      +25     
+ Misses        546     535      -11
Impacted Files Coverage Δ
...ystem.Linq.Dynamic.Core/Parser/ExpressionParser.cs 86.58% <100%> (+0.45%) ⬆️
...ystem.Linq.Dynamic.Core/Parser/ExpressionHelper.cs 95.58% <0%> (+1.47%) ⬆️
...rc/System.Linq.Dynamic.Core/DynamicClassFactory.cs 98.63% <0%> (+1.81%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 62f42fa...966c810. Read the comment docs.

@StefH StefH merged commit 2393949 into zzzprojects:master Aug 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants