Files
swift-mirror/test/Sema/Inputs/discard_module_adjacent.swift
Kavon Farvardin 3e4bc82aa8 rename _forget to discard; deprecate _forget
SE-390 concluded with choosing the keyword discard rather than forget for
the statement that disables the deinit of a noncopyable type. This commit
adds parsing support for `discard self` and adds a deprecation warning for
`_forget self`.

rdar://108859077
2023-05-08 21:42:19 -07:00

13 lines
306 B
Swift

public extension Regular {
__consuming func shutdownParty() {
// FIXME: rdar://108933330 (cannot define struct deinit with -enable-library-evolution)
// discard self // ok; same module
}
}
public extension Frozen {
__consuming func shutdownParty() {
discard self // ok; same module
}
}