We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d2753d8 commit b311316Copy full SHA for b311316
src/alloc.c
@@ -529,8 +529,11 @@ JL_DLLEXPORT jl_code_info_t *jl_code_for_staged(jl_method_instance_t *linfo)
529
}
530
531
func = (jl_code_info_t*)jl_expand((jl_value_t*)ex);
532
- if (!jl_is_code_info(func))
+ if (!jl_is_code_info(func)) {
533
+ if (jl_is_expr(func) && ((jl_expr_t*)func)->head == error_sym)
534
+ jl_interpret_toplevel_expr((jl_value_t*)func);
535
jl_error("generated function body is not pure. this likely means it contains a closure or comprehension.");
536
+ }
537
538
jl_array_t *stmts = (jl_array_t*)func->code;
539
for (i = 0, l = jl_array_len(stmts); i < l; i++) {
0 commit comments