Files
swift-mirror/test/ModuleInterface/addressable_attrs.swift
Joe Groff b9062195e6 AddressableTypes should be a SUPPRESSIBLE_LANGUAGE_FEATURE.
Types annotated as `@_addressableForDependencies` are still usable by older
compilers that don't know about nonescapable types or lifetime dependencies,
since it only affects the behavior of the type when it's the source of a
dependency.
2025-01-13 13:41:09 -08:00

14 lines
536 B
Swift

// RUN: %target-swift-emit-module-interface(%t.swiftinterface) %s -module-name attrs -enable-experimental-feature AddressableTypes
// RUN: %target-swift-typecheck-module-from-interface(%t.swiftinterface) -module-name attrs
// RUN: %FileCheck %s --input-file %t.swiftinterface
// REQUIRES: swift_feature_AddressableTypes
@_addressableForDependencies
public struct Foo {}
// CHECK: #if {{.*}} $AddressableTypes
// CHECK: @_addressableForDependencies public struct Foo
// CHECK: #else
// CHECK: {{^}}public struct Foo {
// CHECK: #endif