Files
swift-mirror/test/Interop/Cxx/implementation-only-imports/check-function-visibility-inversed.swift
Saleem Abdulrasool 357face86e test: introduce new target-swiftxx-frontend for C++ interop
Add an convert to the new `target-swiftxx-frontend` substitution in lit
to control the C++ interop enabling in Swift.  This allows for a single
site which will enable control of both an overridden standard (for
testing multiple C++ standards) and simplify writing tests.
2021-01-12 11:45:36 -08:00

18 lines
560 B
Swift

// RUN: %empty-directory(%t)
// RUN: %target-swiftxx-frontend -emit-module -o %t/FortyTwo.swiftmodule -I %S/Inputs %s
// Swift should consider all sources for a decl and recognize that the
// decl is not hidden behind @_implementationOnly in all modules.
// This test, as well as `check-function-visibility.swift`
// checks that the `getFortyTwo()` decl can be found when at least one of the
// modules is not `@_implementationOnly`.
import UserA
@_implementationOnly import UserB
@_inlineable
public func callFortyTwo() -> CInt {
return getFortyTwo()
}