Skip to content

Commit 0b74d17

Browse files
authored
trimming: make sure to fail / warn on Expr(:call, ...) (#57342)
This dispatch should not be treated as resolved just because arg0 is constant. With the previous code, that meant it was eligible for last-minute call resolution, but call-resolution in codegen is now forbidden so this needs to fail unilaterally.
1 parent 55d5a4b commit 0b74d17

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/codegen.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5908,6 +5908,7 @@ static jl_cgval_t emit_call(jl_codectx_t &ctx, jl_expr_t *ex, jl_value_t *rt, bo
59085908
if (ctx.params->trim != JL_TRIM_NO) {
59095909
// TODO: Implement the last-minute call resolution that used to be here
59105910
// in inference instead.
5911+
failed_dispatch = 1;
59115912
}
59125913

59135914
if (failed_dispatch && trim_may_error(ctx.params->trim)) {

0 commit comments

Comments
 (0)