- Notifications
You must be signed in to change notification settings - Fork 10.5k
/
Copy pathdiscard_interface.swift
18 lines (13 loc) · 737 Bytes
/
discard_interface.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// 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 }
publicstructMoveOnlyStruct:~Copyable {
letx=0
@_alwaysEmitIntoClientpublicconsumingfunc AEIC_discard(){ discard self }
@inlinablepublicconsumingfunc inlinable_discard(){ discard self }
deinit{}
}