Skip to content

Copy RouteOptions as its most specific type#3192

Merged
1ec5 merged 3 commits into
mainfrom
1ec5-options-copy-type-3191
Jul 21, 2021
Merged

Copy RouteOptions as its most specific type#3192
1ec5 merged 3 commits into
mainfrom
1ec5-options-copy-type-3191

Conversation

@1ec5
Copy link
Copy Markdown
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
Copy Markdown
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