Skip to content

Copy RouteOptions as its most specific type #3192

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

Merged
merged 3 commits into from
Jul 21, 2021
Merged

Conversation

1ec5
Copy link
Contributor

@1ec5 1ec5 commented Jul 20, 2021

Fixed an issue where copying an instance of a RouteOptions subclass resulted in an instance of RouteOptions itself. Now calling RouteOptions.copy() always returns the same specific type as the original object.

Along for the ride, RouteOptions.without(waypoint:) has been renamed RouteOptions.without(_:), because the argument label is redundant to the argument type at the point of use.

Fixes #3191.

/cc @mapbox/navigation-ios @OttyLab

@1ec5 1ec5 added the bug Something isn’t working label Jul 20, 2021
@1ec5 1ec5 added this to the v2.0.0 (GA) milestone Jul 20, 2021
@1ec5 1ec5 requested a review from a team July 20, 2021 19:52
@1ec5 1ec5 self-assigned this Jul 20, 2021
1ec5 added 2 commits July 20, 2021 12:54
Fixed an issue where copying a RouteOptions subclass resulted in an instance of RouteOptions itself.
@1ec5 1ec5 force-pushed the 1ec5-options-copy-type-3191 branch from 37d7960 to e47a51c Compare July 20, 2021 19:54
@1ec5 1ec5 merged commit 5b61c18 into main Jul 21, 2021
@1ec5 1ec5 deleted the 1ec5-options-copy-type-3191 branch July 21, 2021 04:42
@1ec5 1ec5 mentioned this pull request Jul 23, 2021
@1ec5
Copy link
Contributor Author

1ec5 commented Jul 23, 2021

1cf370b (3b55a5a) has been cherry-picked to the release-v1.2 branch as 62472d5 and to the release-v1.4 branch as c78a333.

@1ec5 1ec5 mentioned this pull request Jul 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn’t working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RouteOptions subclass type is erased when rerouting
2 participants