mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Merge pull request #85738 from hamishknight/to-wit
[Frontend] Enforce an error was emitted for invalid conformance
This commit is contained in:
@@ -1156,6 +1156,13 @@ static void performEndOfPipelineActions(CompilerInstance &Instance) {
|
||||
|
||||
// Emit extracted constant values for every file in the batch
|
||||
emitConstValuesForAllPrimaryInputsIfNeeded(Instance);
|
||||
|
||||
// Make sure we emitted an error if we encountered an invalid conformance.
|
||||
// This is important since `ASTContext::hadError` accounts for delayed
|
||||
// conformance diags, so we need to ensure we don't exit with a non-zero exit
|
||||
// code without emitting any error.
|
||||
ASSERT(ctx.Diags.hadAnyError() || !ctx.hasDelayedConformanceErrors() &&
|
||||
"Encountered invalid conformance without emitting error?");
|
||||
}
|
||||
|
||||
static bool printSwiftVersion(const CompilerInvocation &Invocation) {
|
||||
|
||||
Reference in New Issue
Block a user