mirror of
https://github.com/apple/swift.git
synced 2026-10-14 15:51:20 +02:00
`using` -> `default`, tweak how `default` is handled outside switch to accommodate this. Initially had some complex recovery to try to interpret `default: @MainActor` but this has cases it regresses and is kinda complicated, can revisit it. Resolves rdar://186699571
24 lines
815 B
Swift
24 lines
815 B
Swift
// REQUIRES: swift_feature_DefaultIsolationPerFile
|
|
|
|
// RUN: %target-swift-emit-module-interface(%t.swiftinterface) %s -module-name FileDefaultDiagnose \
|
|
// RUN: -enable-library-evolution \
|
|
// RUN: -enable-experimental-feature DefaultIsolationPerFile
|
|
// RUN: %target-swift-typecheck-module-from-interface(%t.swiftinterface) -module-name FileDefaultDiagnose
|
|
// RUN: %FileCheck %s < %t.swiftinterface
|
|
|
|
// `@diagnose` is an in-file source-warning control. Neither the `default`
|
|
// declaration nor the attr should appear in the interface.
|
|
// CHECK-NOT: @diagnose
|
|
// CHECK-NOT: default @diagnose
|
|
|
|
default @diagnose(DeprecatedDeclaration, as: ignored)
|
|
|
|
// CHECK: public func someFunc()
|
|
public func someFunc() {}
|
|
|
|
// CHECK: public class SomeClass
|
|
public class SomeClass {
|
|
public init() {}
|
|
public func method() {}
|
|
}
|