We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
async throws
swift-driver version: 1.26.21 Apple Swift version 5.5.2 (swiftlang-1300.0.47.5 clang-1300.0.29.30) Target: arm64-apple-macosx12.0
md5: ec2063df447055775a1cc30dede3ee9c
Issue Description:
class A { func f() async throws { } } class B: A { override func f() async { } } let b: A = B() // Note: let b = B() does compile correctly print(try await b.f())
Code compiles
thread #​1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0xc7d9c5464100) frame #​0: 0x0000000103c873e0 libobjc.A.dylib`objc_release + 16 frame #​1: 0x000000011c731878 libswift_Concurrency.dylib`swift::AsyncTask::~AsyncTask() + 116 frame #​2: 0x000000011c7318d0 libswift_Concurrency.dylib`destroyTask(swift::HeapObject*) + 16 frame #​3: 0x00000001037a3230 libswiftCore.dylib`_swift_release_dealloc + 28 frame #​4: 0x00000001063e0204 $__lldb_expr32`main at <compiler-generated>:0 frame #​5: 0x00000001023c34f0 Test`linkResources + 264 frame #​6: 0x0000000104df1030 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 20 frame #​7: 0x0000000104df02f4 CoreFoundation`__CFRunLoopDoBlocks + 408 frame #​8: 0x0000000104deabb0 CoreFoundation`__CFRunLoopRun + 764 frame #​9: 0x0000000104dea3a8 CoreFoundation`CFRunLoopRunSpecific + 572 frame #​10: 0x000000010ac135ec GraphicsServices`GSEventRunModal + 160 frame #​11: 0x000000010fee67ac UIKitCore`-[UIApplication _run] + 992 frame #​12: 0x000000010feeb2e8 UIKitCore`UIApplicationMain + 112 frame #​13: 0x00000001023c35b0 Test`main + 192 frame #​14: 0x00000001026d1ca0 dyld_sim`start_sim + 20 frame #​15: 0x00000001025190f4 dyld`start + 520
Adding `throws` to the override fixes the issue
This works without `async`
I tested this on playgrounds. Obviously top level code can't be `async` like this, but the issue is reproducible from any function.
The text was updated successfully, but these errors were encountered:
~sync create
Sorry, something went wrong.
@swift-ci create
Fix is coming... #41003
Fix is merged and cherry-picked to the 5.6 branch. Thanks!
No branches or pull requests
Environment
swift-driver version: 1.26.21 Apple Swift version 5.5.2 (swiftlang-1300.0.47.5 clang-1300.0.29.30)
Target: arm64-apple-macosx12.0
Additional Detail from JIRA
md5: ec2063df447055775a1cc30dede3ee9c
Issue Description:
Expected result:
Code compiles
Actual result:
Notes:
Adding `throws` to the override fixes the issue
This works without `async`
I tested this on playgrounds. Obviously top level code can't be `async` like this, but the issue is reproducible from any function.
The text was updated successfully, but these errors were encountered: