Files
swift-mirror/test/ClangImporter/InternalBridgingHeader/library_evolution.swift
Doug Gregor b9f00ef923 Warn about the use of internal bridging headers without library evolution
It's very, very easy to make a mistake that will cause broken
serialized modules. Until that's no longer true, at least tell folks
that they are heading into uncharted waters, as we do with
`@_implementationOnly` imports.
2025-09-19 16:49:22 -07:00

15 lines
693 B
Swift

// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -internal-import-bridging-header %S/../Inputs/c-bridging-header.h -sdk %clang-importer-sdk %s 2>&1 | %FileCheck -check-prefix NONRESILIENT %s
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -internal-import-bridging-header %S/../Inputs/c-bridging-header.h -sdk %clang-importer-sdk %s -enable-library-evolution 2>&1 | %FileCheck -check-prefix EVOLUTION %s
// NONRESILIENT: warning: using internal bridging headers without library evolution can cause instability
// EVOLUTION-NOT: internal bridging head
@available(*, deprecated)
func f() { }
func g(){
f() // make sure we emit something
}