mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
19 lines
737 B
Swift
19 lines
737 B
Swift
// RUN: %empty-directory(%t)
|
|
// RUN: %target-swift-emit-module-interface(%t/Library.swiftinterface) %s -module-name Library -verify
|
|
// RUN: %target-swift-typecheck-module-from-interface(%t/Library.swiftinterface) -I %t
|
|
// RUN: %FileCheck %s < %t/Library.swiftinterface
|
|
|
|
// This test makes sure that discard is emitted correctly in the interfaces.
|
|
|
|
// CHECK: @_alwaysEmitIntoClient public consuming func AEIC_discard() { discard self }
|
|
// CHECK: @inlinable public consuming func inlinable_discard() { discard self }
|
|
|
|
public struct MoveOnlyStruct: ~Copyable {
|
|
let x = 0
|
|
|
|
@_alwaysEmitIntoClient public consuming func AEIC_discard() { discard self }
|
|
@inlinable public consuming func inlinable_discard() { discard self }
|
|
|
|
deinit {}
|
|
}
|