Files
swift-mirror/test/ModuleInterface/moveonly_user.swift
Joe Groff f06621907e SILGen: Don't copy a borrowed noncopyable address-only base of a computed property access.
We can probably avoid this copy in more circumstances, but make the change only for
noncopyable types for now, since that's the case where it's most semantically apparent.
rdar://109161396
2023-06-08 08:36:04 -07:00

22 lines
856 B
Swift

// RUN: %empty-directory(%t)
// >> first try when no library evolution is specified
// RUN: %target-swift-frontend -DSYNTHESIZE_ACCESSORS -emit-module -o %t/Hello.swiftmodule %S/Inputs/moveonly_api.swift
// RUN: %target-swift-frontend -emit-sil -sil-verify-all -I %t %s > /dev/null
// >> now again with library evolution; we expect the same result.
// RUN: %target-swift-frontend -DSYNTHESIZE_ACCESSORS -enable-library-evolution -emit-module -o %t/Hello.swiftmodule %S/Inputs/moveonly_api.swift
// RUN: %target-swift-frontend -emit-sil -sil-verify-all -I %t %s > /dev/null
// FIXME: ideally this would also try executing the program rather than just generating SIL
// FIXME: make this test work when we're not synthesizing the accessors
import Hello
func simpleTest() {
let handle = FileHandle()
let msg = handle.file.fd.message()
print(msg)
}