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

[SR-5462] AnySequence's with tuple elements can not be joined #48034

Closed
swift-ci opened this issue Jul 14, 2017 · 2 comments
Closed

[SR-5462] AnySequence's with tuple elements can not be joined #48034

swift-ci opened this issue Jul 14, 2017 · 2 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself regression swift 4.0 type checker Area → compiler: Semantic analysis

Comments

@swift-ci
Copy link
Collaborator

Previous ID SR-5462
Radar rdar://problem/33353162
Original Reporter courteouselk (JIRA User)
Type Bug
Status Resolved
Resolution Duplicate
Environment

XCode 9 beta 3 (9M174d)

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, 4.0Regression, TypeChecker
Assignee None
Priority Medium

md5: 988816d7786a61f05a46f2d950fd4d9d

blocks:

  • SR-5387 AnySequence.flatMap does not compile in Swift 4.0

Issue Description:

let a = AnySequence( [(1, 1), (3, 3), (5, 5), (7, 7)] )
let b = AnySequence( [(2, 2), (4, 4), (6, 6), (8, 8)] )

let c = [a, b]
    .joined()
    .map({ $0 })

// Playground execution failed:
//
// error: scratchpad.playground:6:10: error: cannot convert value of type '(_) -> _'
//        to expected argument type '(((Int, Int))) -> _'
// .map({ $0 })
// ^~~~~~

print(c)

.. and then the same goes for:

let c = [a, b]
    .joined()
    .map({ arg in
        return arg
    })
@belkadan
Copy link
Contributor

@swift-ci create

@rudkx
Copy link
Member

rudkx commented Jul 17, 2017

Appears to have the same underlying cause as SR-5387, which is fixed on master and swift-4.0-branch.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself regression swift 4.0 type checker Area → compiler: Semantic analysis
Projects
None yet
Development

No branches or pull requests

4 participants