Files
swift-mirror/test/SIL/Serialization/isolated_parameters.sil
Michael Gottesman 4aea60c4b1 Fix test case.
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.
2024-05-12 22:14:09 -07:00

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
}