Files
swift-mirror/test/ModuleInterface/using_diagnose.swift
Aviva Ruben ce56e9ce6c Implement file-level using @available (and stop rejecting diagnose)
Diagnose was already supported by swift syntax, so we don't need to
track it at all in C++. Adds support for propagating a file default
availability via a side effect of a request. Ideally this would go
away in a future compiler that doesn't mutate decls to apply inferred
attributes. Future default attributes probably end up in this request,
unfortunately.
2026-06-22 13:31:20 -07:00

24 lines
797 B
Swift

// REQUIRES: swift_feature_DefaultIsolationPerFile
// RUN: %target-swift-emit-module-interface(%t.swiftinterface) %s -module-name UsingDiagnose \
// RUN: -enable-library-evolution \
// RUN: -enable-experimental-feature DefaultIsolationPerFile
// RUN: %target-swift-typecheck-module-from-interface(%t.swiftinterface) -module-name UsingDiagnose
// RUN: %FileCheck %s < %t.swiftinterface
// `@diagnose` is an in-file source-warning control. Neither the `using`
// declaration nor the attr should appear in the interface.
// CHECK-NOT: @diagnose
// CHECK-NOT: using @diagnose
using @diagnose(DeprecatedDeclaration, as: ignored)
// CHECK: public func someFunc()
public func someFunc() {}
// CHECK: public class SomeClass
public class SomeClass {
public init() {}
public func method() {}
}