mirror of
https://github.com/apple/swift.git
synced 2026-10-22 19:15:50 +02:00
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.
24 lines
797 B
Swift
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() {}
|
|
}
|