Files
swift-mirror/test/ModuleInterface/file_default_diagnose.swift
Aviva Ruben e105afa992 [Parse] Parse new 'default' syntax
`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
2026-09-15 17:05:05 -07:00

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() {}
}