Files
swift-mirror/test/Serialization/nested-protocols.swift
Michael Gottesman a0088327d4 [concurrency] Represent a SILFunction without isolation as std::optional<ActorIsolation> instead of ActorIsolation::Unspecified.
The reason why is that we want to distinguish inbetween SILFunction's that are
marked as unspecified by SILGen and those that are parsed from textual SIL that
do not have any specified isolation. This will make it easier to write nice
FileCheck tests against SILGen output on what is the inferred isolation for
various items.

NFCI.
2024-09-18 11:23:22 -07:00

15 lines
750 B
Swift

// RUN: %empty-directory(%t)
// RUN: %target-swift-frontend -emit-module -module-name nestedprotocolsource -emit-module-path %t/nestedprotocolsource.swiftmodule -primary-file %S/Inputs/nested-protocols.swift
// RUN: %target-swift-frontend -emit-sil %s -I %t | %FileCheck %s
import nestedprotocolsource
// CHECK: usesNested<A>(_:)
// CHECK-NEXT: Isolation: unspecified
// CHECK-NEXT: sil @$s4main10usesNestedyyx20nestedprotocolsource5OuterV5InnerRzlF :
public func usesNested(_ x: some Outer.Inner) {}
// CHECK: usesNestedInExtension<A>(_:)
// CHECK-NEXT: Isolation: unspecified
// CHECK-NEXT: sil @$s4main21usesNestedInExtensionyyx20nestedprotocolsource5OuterV05InnerdE0RzlF :
public func usesNestedInExtension(_ x: some Outer.InnerInExtension) {}