mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Move lifetime diagnostics after consume operator diagnostics.
This fixes bugs when ~Escapable types depended on values that are passed to 'consume'. The consume operator diagnostics are broken when dependent values are present. This sidesteps the problem for lifetime dependence. And we generally want to diagnose lifetime dependence after all move-only related diagnostics. That way, using a dependent value after consume provides a more informative diagnostic about the dependent value and its scope.
This commit is contained in:
@@ -155,6 +155,8 @@ bool CheckerLivenessInfo::compute() {
|
||||
}
|
||||
}
|
||||
}
|
||||
// FIXME: this ignores all other forms of Borrow ownership, such as
|
||||
// partial_apply [onstack] and mark_dependence [nonescaping].
|
||||
break;
|
||||
}
|
||||
case OperandOwnership::GuaranteedForwarding:
|
||||
|
||||
Reference in New Issue
Block a user