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-8765] SIG Fault with IR SIL generation for this code. #51273

Closed
swift-ci opened this issue Sep 16, 2018 · 0 comments
Closed

[SR-8765] SIG Fault with IR SIL generation for this code. #51273

swift-ci opened this issue Sep 16, 2018 · 0 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself

Comments

@swift-ci
Copy link
Collaborator

Previous ID SR-8765
Radar None
Original Reporter kandelvijaya.apple (JIRA User)
Type Bug
Status Resolved
Resolution Duplicate
Environment

Xcode 10 compiling with Swift 4.

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

md5: 657bee1e4a8c3d01e8f4b8b27f03d668

duplicates:

  • SR-8764 IR SIL generation failed for applyWrapped function in Swift4 Xcode 10

Issue Description:

I'm doing my codebase migration. Stumbled upon SEG Fault in this piece of code.

I tried executing in Playgrounds and a single view app with this code in the view controller file. Both fails to compile.

@discardableResult public func applyWrapped<T, U>(function: Optional<(T) -> U>, to value: Optional<T>) -> Optional<U> {
    switch (function, value) {
    case (let .some(f), let .some(v)):
        return .some(f(v))
    case (.none, _):
        return .none
    case (_, .none):
        return .none
    }
}

Im running Xcode 10 and trying to compile with Swift4

@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
Projects
None yet
Development

No branches or pull requests

1 participant