Skip to content

Commit a1233ee

Browse files
topolarityKristofferC
authored andcommitted
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. (cherry picked from commit 0b74d17)
1 parent 1e962ac commit a1233ee

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
@@ -5923,6 +5923,7 @@ static jl_cgval_t emit_call(jl_codectx_t &ctx, jl_expr_t *ex, jl_value_t *rt, bo
59235923
if (ctx.params->trim != JL_TRIM_NO) {
59245924
// TODO: Implement the last-minute call resolution that used to be here
59255925
// in inference instead.
5926+
failed_dispatch = 1;
59265927
}
59275928

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

0 commit comments

Comments
 (0)