Skip to content

Commit

Permalink
Stop creating destructors for non destructable types
Browse files Browse the repository at this point in the history
  • Loading branch information
Victorious3 committed Jul 6, 2022
1 parent ad378c3 commit 7b76f16
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/compiler.pr
Original file line number Diff line number Diff line change
Expand Up @@ -6655,7 +6655,7 @@ def create_destructor(tpe: *typechecking::Type, value: Value, state: *State) {

if destructor {
state.call(destructor.type_name, null, [field_value])
} else {
} else if typechecking::has_destructor(field.tpe) {
let args = vector::make()
let first_param = allocate(typechecking::NamedParameter)
@first_param = {
Expand Down

0 comments on commit 7b76f16

Please sign in to comment.