Files
swift-mirror/test/ModuleInterface/availability_custom_domains.swift
Allan Shortlidge a5a49aaab6 ModuleInterface: Stop printing $CustomAvailability guards in swiftinterfaces.
All supported compilers can now parse `@available` attributes that reference
custom availability domains.
2025-09-04 09:12:27 -07:00

31 lines
1004 B
Swift

// RUN: %empty-directory(%t)
// RUN: %target-swift-emit-module-interface(%t/Test.swiftinterface) %s \
// RUN: -I %S/../Inputs/custom-modules/availability-domains \
// RUN: -enable-experimental-feature CustomAvailability \
// RUN: -module-name Test
// RUN: %target-swift-typecheck-module-from-interface(%t/Test.swiftinterface) \
// RUN: -I %S/../Inputs/custom-modules/availability-domains \
// RUN: -module-name Test
// RUN: %FileCheck %s < %t/Test.swiftinterface
// REQUIRES: swift_feature_CustomAvailability
import Oceans // re-exports Rivers
// CHECK-NOT: $CustomAvailability
// CHECK: @available(Colorado)
// CHECK-NEXT: public func availableInColorado()
@available(Colorado)
public func availableInColorado() { }
// CHECK: @available(Arctic, unavailable)
// CHECK-NEXT: @available(Pacific)
// CHECK-NEXT: public func unavailableInArcticButAvailableInPacific()
@available(Arctic, unavailable)
@available(Pacific)
public func unavailableInArcticButAvailableInPacific() { }