Skip to content

Fix panic with UnliftedFFITypes+CApiFFI (#14624)

Alex D requested to merge wip/T14624 into master

Fixes #14624 (closed)

When declaring foreign import using CAPI calling convention, using unlifted unboxed types would result in compiler panic. There was an attempt to fix the situation in #9274 (closed), however it only addressed some of the ByteArray cases.

This patch fixes other missed cases for all prims that may be used as basic foreign types.

ppPrimTyConStgType was implemented to print proper C types when generating C wrappers. Documentation section 6.17.2.1. Unlifted FFI Types was used as a specification to define which types can be used as arguments.

Merge request reports