fix ast-check with single error (#865)

This commit is contained in:
Techatrix 2022-12-30 23:43:40 +00:00 committed by GitHub
parent 94ec3a0a86
commit d86d05d969
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -453,6 +453,12 @@ fn getAstCheckDiagnostics(
}; };
} }
} }
if (last_diagnostic) |*diagnostic| {
diagnostic.relatedInformation = try last_related_diagnostics.toOwnedSlice(allocator);
try diagnostics.append(allocator, diagnostic.*);
last_diagnostic = null;
}
} }
/// caller owns returned memory. /// caller owns returned memory.