Skip to content

Commit e2d341f

Browse files
committed
[Concurrency] Added swift_deletedAsyncMethodError.
The new async function will be used as a placeholder in VTables and WTables for async functions which have been deleted. rdar://76061892
1 parent df6ad7f commit e2d341f

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

stdlib/public/Concurrency/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ add_swift_target_library(swift_Concurrency ${SWIFT_STDLIB_LIBRARY_BUILD_TYPES} I
3939
Actor.swift
4040
CheckedContinuation.swift
4141
GlobalExecutor.cpp
42+
Errors.swift
4243
Executor.swift
4344
AsyncCompactMapSequence.swift
4445
AsyncDropFirstSequence.swift
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
////===----------------------------------------------------------------------===//
2+
////
3+
//// This source file is part of the Swift.org open source project
4+
////
5+
//// Copyright (c) 2020 Apple Inc. and the Swift project authors
6+
//// Licensed under Apache License v2.0 with Runtime Library Exception
7+
////
8+
//// See https://swift.org/LICENSE.txt for license information
9+
//// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
10+
////
11+
////===----------------------------------------------------------------------===//
12+
13+
import Swift
14+
@_implementationOnly import _SwiftConcurrencyShims
15+
16+
@_silgen_name("swift_deletedAsyncMethodError")
17+
public func swift_deletedAsyncMethodError() async {
18+
fatalError("Fatal error: Call of deleted method")
19+
}

0 commit comments

Comments
 (0)