@@ -26,9 +26,9 @@ let createCase (label, attributes) =
26
26
(match
27
27
attributes |> Annotation. getAttributePayload Annotation. tagIsAs
28
28
with
29
- | Some (_ , IdentPayload (Lident "null" )) -> NullLabel
30
- | Some (_ , IdentPayload (Lident "undefined" )) -> UndefinedLabel
31
- | Some (_ , BoolPayload b ) -> BoolLabel b
29
+ | Some (_ , IdentPayload (Lident "null" )) -> NullLabel
30
+ | Some (_ , IdentPayload (Lident "undefined" )) -> UndefinedLabel
31
+ | Some (_ , BoolPayload b ) -> BoolLabel b
32
32
| Some (_ , FloatPayload s ) -> FloatLabel s
33
33
| Some (_ , IntPayload i ) -> IntLabel i
34
34
| Some (_ , StringPayload asLabel ) -> StringLabel asLabel
@@ -197,7 +197,7 @@ let traslateDeclarationKind ~config ~loc ~outputFileRelative ~resolver
197
197
else variant.payloads
198
198
in
199
199
createVariant ~bs StringOrInt:false ~inherits: variant.inherits
200
- ~no Payloads ~payloads ~polymorphic: true
200
+ ~no Payloads ~payloads ~polymorphic: true ~unboxed: false
201
201
| _ -> translation.type_
202
202
in
203
203
{translation with type_} |> handleGeneralDeclaration
@@ -311,11 +311,8 @@ let traslateDeclarationKind ~config ~loc ~outputFileRelative ~resolver
311
311
})
312
312
in
313
313
let variantTyp =
314
- match (noPayloads, payloads) with
315
- | [] , [{t = type_}] when unboxedAnnotation -> type_
316
- | _ ->
317
- createVariant ~bs StringOrInt:false ~inherits: [] ~no Payloads ~payloads
318
- ~polymorphic: false
314
+ createVariant ~bs StringOrInt:false ~inherits: [] ~no Payloads ~payloads
315
+ ~polymorphic: false ~unboxed: unboxedAnnotation
319
316
in
320
317
let resolvedTypeName = typeName |> TypeEnv. addModulePath ~type Env in
321
318
let exportFromTypeDeclaration =
0 commit comments