mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Merge pull request #84975 from jckarter/cant-discard-in-inlinable-code
Sema: `discard self` should not be allowed in inlinable methods of non-frozen types.
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
// CHECK: @_alwaysEmitIntoClient public consuming func AEIC_discard() { discard self }
|
||||
// CHECK: @inlinable public consuming func inlinable_discard() { discard self }
|
||||
|
||||
@frozen
|
||||
public struct MoveOnlyStruct: ~Copyable {
|
||||
let x = 0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user