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

[DNM] Try to fix the ambiguous use of expect on Swift 5.3 #820

Closed
wants to merge 1 commit into from

Conversation

ikesyo
Copy link
Member

@ikesyo ikesyo commented Sep 9, 2020

ref: #809

@ikesyo ikesyo changed the title Try to fix the ambiguous use of expect on Swift 5.3 [DNM] Try to fix the ambiguous use of expect on Swift 5.3 Sep 9, 2020
@ikesyo ikesyo force-pushed the swift-5.3-experiment branch from c16467d to 4d59c86 Compare September 9, 2020 15:42
@ikesyo ikesyo force-pushed the swift-5.3-experiment branch 2 times, most recently from 3d3f75e to eb35a13 Compare September 16, 2020 00:21
@ikesyo ikesyo force-pushed the swift-5.3-experiment branch from eb35a13 to a507d86 Compare September 16, 2020 01:11
@ikesyo
Copy link
Member Author

ikesyo commented Sep 17, 2020

@ashdnazg

I think a simpler way would be to just wrap the 2nd except with #if !swift(>=5.3).

That doesn't work. In that case expect { 1 } is evaluated as Expectation<() -> Int> (T is () -> Int, not Int: a trailing closure itself is wrapped by @autoclosure). What we want here is Expectation<Int>.

@ikesyo
Copy link
Member Author

ikesyo commented Sep 17, 2020

Superseded by #824 and #825.

@ikesyo ikesyo closed this Sep 17, 2020
@ikesyo ikesyo deleted the swift-5.3-experiment branch September 17, 2020 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant