Skip to content

Declare Data.period property is a way compatitible with + operator #6149

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 1 commit into from
Feb 14, 2023

Conversation

xedin
Copy link
Contributor

@xedin xedin commented Feb 12, 2023

Cannot use extension Data if period is going to be used with + operator via leading-dot syntax, for example: Data(...) + .period because + is declared as (Self, Other) -> Self where Other: RangeReplaceableCollection, Other.Element == Self.Element which means that .period couldn't get Data inferred from the first argument.

Cannot use `extension Data` if `period` is going to be used with
`+` operator via leading-dot syntax, for example: `Data(...) + .period`
because `+` is declared as `(Self, Other) -> Self` where
`Other: RangeReplaceableCollection, Other.Element == Self.Element`
which means that `.period` couldn't get `Data` inferred from the first argument.
@xedin
Copy link
Contributor Author

xedin commented Feb 12, 2023

Using this PR to test swiftlang/swift#63585

@xedin
Copy link
Contributor Author

xedin commented Feb 14, 2023

@swift-ci please test

@xedin
Copy link
Contributor Author

xedin commented Feb 14, 2023

@swift-ci smoke test

@xedin xedin marked this pull request as ready for review February 14, 2023 04:15
@xedin
Copy link
Contributor Author

xedin commented Feb 14, 2023

@tomerd Would you mind if I landed this if there are no failures? Our performance testing suite cannot handle cross repository testing.

@tomerd
Copy link
Contributor

tomerd commented Feb 14, 2023

@xedin 👍

@xedin xedin merged commit ff94963 into swiftlang:main Feb 14, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants