Skip to content

Commit c2234fd

Browse files
committed
Compiler: small fixes
* fix literal output for `cast<T>(expr)` * fix compilation error for c2_trace code
1 parent 99c34ee commit c2234fd

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

ast/explicit_cast_expr.c2

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,9 @@ fn void ExplicitCastExpr.printLiteral(const ExplicitCastExpr* e, string_buffer.B
9494
} else {
9595
out.add("cast<");
9696
e.dest.print(out, true);
97-
out.add1('>');
97+
out.add(">(");
9898
e.inner.printLiteral(out);
99+
out.add1(')');
99100
}
100101
}
101102

generator/c2_trace.c2

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ fn bool match_name(const char *name, const char *pattern) {
4040
}
4141
return (!c1 && (c2 == ',' || c2 == ';'));
4242
}
43-
return false;
4443
}
4544

4645
fn bool match_pattern(const char *name, const char *pattern) {

0 commit comments

Comments
 (0)