Navigation Menu

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-10164] Compiler Crash: Result<T: Swift.Error>.success #52566

Closed
swift-ci opened this issue Mar 25, 2019 · 3 comments
Closed

[SR-10164] Compiler Crash: Result<T: Swift.Error>.success #52566

swift-ci opened this issue Mar 25, 2019 · 3 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself crash Bug: A crash, i.e., an abnormal termination of software

Comments

@swift-ci
Copy link
Collaborator

Previous ID SR-10164
Radar None
Original Reporter swhitty (JIRA User)
Type Bug
Status Resolved
Resolution Duplicate

Attachment: Download

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

md5: 7e2334d85ca7c6741aba966df65813a0

duplicates:

  • SR-10015 values.map(Result.success) raises assertion failure

Issue Description:

Compiler crash when attempting access a Result<T: Swift.Error> case as a function

let fn = Result<Any, NSError>.success
// ✅ fn == (Any) -> Result<Any, NSError>

let fn = Result<Any, Swift.Error>.success
// ❌ crash. Expected fn == (Any) -> Result<Any, Swift.Error>
@belkadan
Copy link
Contributor

   Assertion failed: (isa<ArchetypeType>(type)), function addProtocolConformance, file /Volumes/Data/swift-public/swift/lib/IRGen/GenProto.cpp, line 2721.
Stack dump:
0.  Program arguments: /Volumes/Data/swift-public/build/ninja/swift-macosx-x86_64/bin/swift -frontend -c -primary-file - -target x86_64-apple-darwin18.5.0 -enable-objc-interop -sdk /Volumes/Data/Applications/Xcode10.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -color-diagnostics -module-name main -o /var/folders/_d/dmrgv26d3bs6lkrks9z825_w0000gn/T/--e70826.o 
1.  While emitting IR SIL function "@main".

This looks familiar…

@theblixguy
Copy link
Collaborator

Yep, seems like the same issue as https://bugs.swift.org/browse/SR-10093

@weissi
Copy link
Member

weissi commented Apr 5, 2019

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@AnthonyLatsis AnthonyLatsis added the crash Bug: A crash, i.e., an abnormal termination of software label Dec 12, 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 crash Bug: A crash, i.e., an abnormal termination of software
Projects
None yet
Development

No branches or pull requests

5 participants