Fix parsing #force_inline call expression with or_return

This commit is contained in:
Fabian Sperber
2023-09-05 22:35:30 +02:00
parent d60c619c44
commit bbf9678756
2 changed files with 22 additions and 1 deletions
+1 -1
View File
@@ -2153,7 +2153,7 @@ parse_inlining_operand :: proc(p: ^Parser, lhs: bool, tok: tokenizer.Token) -> ^
}
}
#partial switch e in ast.unparen_expr(expr).derived_expr {
#partial switch e in ast.strip_or_return_expr(expr).derived_expr {
case ^ast.Proc_Lit:
if e.inlining != .None && e.inlining != pi {
error(p, expr.pos, "both 'inline' and 'no_inline' cannot be applied to a procedure literal")