Sema: fix parameter of type 'T' must be comptime error

Closes #12519
Closes #12505
This commit is contained in:
Veikka Tuominen
2022-08-21 18:04:46 +03:00
parent b2f02a820f
commit b55a5007fa
14 changed files with 51 additions and 22 deletions

View File

@@ -3670,7 +3670,7 @@ const Parser = struct {
}
/// KEYWORD_if LPAREN Expr RPAREN PtrPayload? Body (KEYWORD_else Payload? Body)?
fn parseIf(p: *Parser, bodyParseFn: fn (p: *Parser) Error!Node.Index) !Node.Index {
fn parseIf(p: *Parser, comptime bodyParseFn: fn (p: *Parser) Error!Node.Index) !Node.Index {
const if_token = p.eatToken(.keyword_if) orelse return null_node;
_ = try p.expectToken(.l_paren);
const condition = try p.expectExpr();