Sema: improve handling of always_tail call modifier

Closes #4301
Closes #5692
Closes #6281
Closes #10786
Closes #11149
Closes #11776
This commit is contained in:
Veikka Tuominen
2022-08-30 14:04:13 +03:00
committed by Andrew Kelley
parent 0a42602418
commit 67a44211f7
5 changed files with 114 additions and 6 deletions

View File

@@ -4522,7 +4522,7 @@ pub const FuncGen = struct {
"",
);
if (return_type.isNoReturn()) {
if (return_type.isNoReturn() and attr != .AlwaysTail) {
_ = self.builder.buildUnreachable();
return null;
}