diff --git a/nac3artiq/src/codegen.rs b/nac3artiq/src/codegen.rs index b63ee60c..809b7cc4 100644 --- a/nac3artiq/src/codegen.rs +++ b/nac3artiq/src/codegen.rs @@ -513,7 +513,9 @@ pub fn attributes_writeback<'ctx, 'a>( } let ty = ty.unwrap(); match &*ctx.unifier.get_ty(ty) { - TypeEnum::TObj { fields, .. } => { + TypeEnum::TObj { fields, obj_id, .. } + if *obj_id != ctx.primitives.option.get_obj_id(&ctx.unifier) => + { // we only care about primitive attributes // for non-primitive attributes, they should be in another global let mut attributes = Vec::new();