Skip to content

Commit ab92622

Browse files
committed
fix: win inkwell assert panic
1 parent 3cefab0 commit ab92622

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/ast/node/types.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -618,6 +618,8 @@ impl StructDefNode {
618618
st,
619619
ctx,
620620
);
621+
// An inkwell bug on windows, remove this line may result in an assert panic
622+
builder.clear_insertion_position();
621623
// gen st vist function must be called after add_body_to_struct_type
622624
builder.gen_st_visit_function(ctx, st, &field_pltps);
623625
}

0 commit comments

Comments
 (0)