Files
swift-mirror/test/ModuleInterface/file_default_diagnose.swift
2026-10-14 09:23:34 -07:00

21 lines
698 B
Swift

// RUN: %target-swift-emit-module-interface(%t.swiftinterface) %s -module-name FileDefaultDiagnose \
// RUN: -enable-library-evolution
// 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() {}
}