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: allow overlapping types in Expected #5218

Merged
merged 3 commits into from
Dec 16, 2024

Conversation

mvadari
Copy link
Collaborator

@mvadari mvadari commented Dec 10, 2024

High Level Overview of Change

This PR allows Expected to have overlapping types.

Context of Change

I ran into an issue with Expected<std::uint32_t, Json::Value>, which wouldn't build because of implicit conversion from unsigned int to Json::Value. This fixed the issue.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)

API Impact

N/A

Test Plan

Added a test

@mvadari mvadari requested review from godexsoft and Bronek December 10, 2024 19:21
@mvadari mvadari changed the title bugfix: fix overlapping types in Expected fix: allow overlapping types in Expected Dec 10, 2024
Copy link
Collaborator

@godexsoft godexsoft left a comment

Choose a reason for hiding this comment

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

Great job 🚀

Copy link
Collaborator

@Bronek Bronek left a comment

Choose a reason for hiding this comment

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

Nice unit test !

Copy link

codecov bot commented Dec 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.9%. Comparing base (ea1fffe) to head (56ebe54).
Report is 4 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           develop   #5218   +/-   ##
=======================================
  Coverage     77.9%   77.9%           
=======================================
  Files          783     783           
  Lines        66677   66707   +30     
  Branches      8108    8119   +11     
=======================================
+ Hits         51921   51953   +32     
+ Misses       14756   14754    -2     
Files with missing lines Coverage Δ
include/xrpl/basics/Expected.h 100.0% <100.0%> (ø)

... and 7 files with indirect coverage changes

Impacted file tree graph

@mvadari mvadari added the Ready to merge *PR author* thinks it's ready to merge. Has passed code review. Perf sign-off may still be required. label Dec 10, 2024
@mvadari
Copy link
Collaborator Author

mvadari commented Dec 10, 2024

This is ready to merge

@ximinez ximinez merged commit bcbfb04 into XRPLF:develop Dec 16, 2024
8 of 9 checks passed
@mvadari mvadari deleted the expected-overlap branch December 17, 2024 00:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ready to merge *PR author* thinks it's ready to merge. Has passed code review. Perf sign-off may still be required.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants