mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
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.
18 lines
346 B
Swift
18 lines
346 B
Swift
// RUN: %empty-directory(%t)
|
|
// RUN: %target-swiftxx-frontend -typecheck %s -I %S/Inputs/custom-modules
|
|
|
|
import CXXInterop
|
|
|
|
// Basic structs
|
|
do {
|
|
var tmp: Basic = makeA()
|
|
tmp.a = 3
|
|
tmp.b = nil
|
|
}
|
|
|
|
// Namespace lookup
|
|
func namespaceLookup() -> UnsafeMutablePointer<ns.T> {
|
|
var tmp: UnsafeMutablePointer<ns.T> = ns.doMakeT()!
|
|
return tmp
|
|
}
|