mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
We have some arc specific casts in our generated headers that can trigger some warnings in non-arc Obj-C++ code. These casts are noop in that case so it is fine to have them there. And we do want them as we want the code to be compatible both with arc and non-arc code. rdar://163281971
22 lines
777 B
Swift
22 lines
777 B
Swift
// RUN: %empty-directory(%t)
|
|
|
|
// RUN: %target-swift-frontend %s -module-name UseCoreFoundation -enable-experimental-cxx-interop -clang-header-expose-decls=all-public -typecheck -verify -emit-clang-header-path %t/UseCoreFoundation.h
|
|
// RUN: %target-interop-build-clangxx -std=gnu++20 -fobjc-arc -c -x objective-c++-header %t/UseCoreFoundation.h -o %t/o.o
|
|
// RUN: %target-interop-build-clangxx -Werror=arc-bridge-casts-disallowed-in-nonarc -std=gnu++20 -fno-objc-arc -c -x objective-c++-header %t/UseCoreFoundation.h -o %t/o.o
|
|
|
|
// REQUIRES: objc_interop
|
|
|
|
import Foundation
|
|
|
|
public class TestFoundationType {
|
|
private let _bundle: Bundle?
|
|
|
|
public init(resourcesBundle bundle: Bundle? = nil) {
|
|
_bundle = bundle
|
|
}
|
|
}
|
|
|
|
public func getArray() -> [String] {
|
|
[]
|
|
}
|