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:
committed by
Andrew Kelley
parent
0a42602418
commit
67a44211f7
@@ -4522,7 +4522,7 @@ pub const FuncGen = struct {
|
||||
"",
|
||||
);
|
||||
|
||||
if (return_type.isNoReturn()) {
|
||||
if (return_type.isNoReturn() and attr != .AlwaysTail) {
|
||||
_ = self.builder.buildUnreachable();
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user