mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
The specific problem was that the AST was looking for Actor/AnyActor in _Concurrency... but I named the module of the test borrowing (for some reason). So the machinery was failing to think that my stubbed out protocols where the true known protocols. By changing the module name to _Concurrency, everything worked out.
27 lines
908 B
Plaintext
27 lines
908 B
Plaintext
// RUN: %empty-directory(%t)
|
|
// RUN: %target-sil-opt %s -emit-sib -o %t/tmp.sib -module-name _Concurrency
|
|
// RUN: %target-sil-opt %t/tmp.sib -o %t/tmp.2.sib -module-name _Concurrency
|
|
// RUN: %target-sil-opt %t/tmp.2.sib -module-name _Concurrency -emit-sorted-sil | %FileCheck %s
|
|
|
|
// REQUIRES: asserts
|
|
// REQUIRES: concurrency
|
|
|
|
sil_stage canonical
|
|
|
|
import Builtin
|
|
import Swift
|
|
import SwiftShims
|
|
|
|
// NOTE: In SIL we do not save/print out imports, so we cannot import _Concurrency here!
|
|
|
|
public protocol AnyActor: AnyObject, Sendable {}
|
|
public protocol Actor : AnyActor {}
|
|
|
|
|
|
// CHECK-LABEL: sil [serialized] [ossa] @assumeIsolated : $@convention(method) <τ_0_0 where τ_0_0 : Actor> (@sil_isolated @guaranteed τ_0_0) -> () {
|
|
|
|
sil [serialized] [ossa] @assumeIsolated : $@convention(method) <τ_0_0 where τ_0_0 : Actor> (@sil_isolated @guaranteed τ_0_0) -> () {
|
|
bb0(%0 : @guaranteed $τ_0_0):
|
|
unreachable
|
|
}
|